ByteBufferUtils

Undocumented in source.

Members

Static functions

newReadableBuffer
ByteBuffer newReadableBuffer(int capacity)
Undocumented in source. Be warned that the author may not have intended to support it.
newWriteableBuffer
ByteBuffer newWriteableBuffer(int capacity)
Undocumented in source. Be warned that the author may not have intended to support it.
pour
int pour(ByteBuffer source, ByteBuffer destination)

@return number of bytes poured

pourAll
int pourAll(ByteBuffer source, TransportInput destinationTransportInput)

Pours the contents of {@code source} into {@code destinationTransportInput}, calling the TransportInput many times if necessary. If the TransportInput returns a {@link hunt.proton.engine.TransportResult} other than ok, data may remain in source.

pourArrayToBuffer
int pourArrayToBuffer(byte[] source, int offset, int sizeRequested, ByteBuffer destination)

Assumes {@code destination} is ready to be written.

pourBufferToArray
int pourBufferToArray(ByteBuffer source, byte[] destination, int offset, int sizeRequested)

Assumes {@code source} is ready to be read.

Meta