jremote jbase5.2.1

com.jbase.jremote.io
Interface IByteObject

All Known Implementing Classes:
ByteObject, JDynArray

public interface IByteObject

This interface allows a client to optimise the serialization of byte buffers. This may be neccessary to avoid unneccessary copying or creation of byte arrays.


Method Summary
 ByteBuffer getByteBuffer()
          This method should return a ByteBuffer set to the position to start writing into it.
 byte[] getBytes()
          Return the bytes backing this IByteObject.
 void setByteBuffer(ByteBuffer byteBuffer)
          Allow the internal storage to be replaced, as it may be reallocated externally.
 

Method Detail

getByteBuffer

ByteBuffer getByteBuffer()
                         throws IOException
This method should return a ByteBuffer set to the position to start writing into it. NOTE - if reading data the ByteBuffer will be expanded to fit the amount of data being read.

Throws:
IOException

setByteBuffer

void setByteBuffer(ByteBuffer byteBuffer)
                   throws IOException
Allow the internal storage to be replaced, as it may be reallocated externally.

Throws:
IOException

getBytes

byte[] getBytes()

Return the bytes backing this IByteObject.


jremote jbase5.2.1

Copyright © 2016 TEMENOS. All Rights Reserved.