docs: public byte[] toBytes(T object) {
          try {
              ByteArrayOutputStream stream = new ByteArrayOutputStream();
              ObjectOutputStream out = new ObjectOutputStream(stream);
              out.writeObject(object);
              return stream.toByteArray();
          } catch(IOException e) {
              throw new SerializationException(e);
          }
      }