class SerializableDataAccess<T extends Serializable> extends AbstractData<T>
        implements DataAccess<T> {

    // Cache fields
    transient Bytes bytes;
    transient OutputStream out;
    transient InputStream in;

    /**
     * State field
     */
    transient T instance;

    public SerializableDataAccess() {
        this(DEFAULT_BYTES_CAPACITY);
    }

    SerializableDataAccess(long bytesCapacity) {
        initTransients(bytesCapacity);
    }

    void initTransients(long bytesCapacity) {
        bytes = DefaultElasticBytes.allocateDefaultElasticBytes(bytesCapacity);
        out = bytes.outputStream();
        in = bytes.inputStream();
    }

    @Override
    public RandomDataInput bytes() {
        return bytes.bytesStore();
    }

    @Override
    public long offset() {
        return 0;
    }

    @Override
    public long size() {
        return bytes.readRemaining();
    }

    @Override
    public T get() {
        return instance;
    }

    // TODO reuse using object
    @Override
    public T getUsing(@Nullable T using) {<FILL_FUNCTION_BODY>}

    @Override
    public Data<T> getData(@NotNull T instance) {
        this.instance = instance;
        bytes.clear();
        try {
            ObjectOutputStream out = new ObjectOutputStream(this.out);
            out.writeObject(instance);
            out.flush();
            return this;
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public void uninit() {
        instance = null;
    }

    @Override
    public DataAccess<T> copy() {
        return new SerializableDataAccess<>(bytes.realCapacity());
    }

    @Override
    public void readMarshallable(@NotNull WireIn wireIn) {
        // no fields to read
        initTransients(DEFAULT_BYTES_CAPACITY);
    }

    @Override
    public void writeMarshallable(@NotNull WireOut wireOut) {
        // no fields to write
    }
}

        try {
            T result = (T) new ObjectInputStream(in).readObject();
            bytes.readPosition(0);
            return result;
        } catch (IOException | ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    
<methods>public boolean equals(java.lang.Object) ,public int hashCode() ,public java.lang.String toString() <variables>