Interface QpidByteBuffer
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface QpidByteBuffer extends java.lang.AutoCloseable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static QpidByteBuffer
allocate(boolean direct, int size)
static QpidByteBuffer
allocate(int size)
static QpidByteBuffer
allocateDirect(int size)
byte[]
array()
java.io.InputStream
asInputStream()
static QpidByteBuffer
asQpidByteBuffer(java.io.InputStream stream)
int
capacity()
QpidByteBuffer
clear()
void
close()
QpidByteBuffer
compact()
static QpidByteBuffer
concatenate(java.util.List<QpidByteBuffer> buffers)
static QpidByteBuffer
concatenate(QpidByteBuffer... buffers)
void
copyTo(byte[] dst)
void
copyTo(java.nio.ByteBuffer dst)
static java.util.concurrent.ThreadFactory
createQpidByteBufferTrackingThreadFactory(java.util.concurrent.ThreadFactory factory)
static javax.net.ssl.SSLEngineResult
decryptSSL(javax.net.ssl.SSLEngine engine, QpidByteBuffer src, QpidByteBuffer dst)
static QpidByteBuffer
deflate(QpidByteBuffer uncompressedBuffer)
static void
deinitialisePool()
Test use onlyvoid
dispose()
QpidByteBuffer
duplicate()
static QpidByteBuffer
emptyQpidByteBuffer()
static javax.net.ssl.SSLEngineResult
encryptSSL(javax.net.ssl.SSLEngine engine, java.util.Collection<QpidByteBuffer> buffers, QpidByteBuffer dest)
QpidByteBuffer
flip()
byte
get()
QpidByteBuffer
get(byte[] dst)
QpidByteBuffer
get(byte[] dst, int offset, int length)
byte
get(int index)
static long
getAllocatedDirectMemorySize()
char
getChar()
char
getChar(int index)
double
getDouble()
double
getDouble(int index)
float
getFloat()
float
getFloat(int index)
int
getInt()
int
getInt(int index)
long
getLong()
long
getLong(int index)
static int
getNumberOfBuffersInPool()
static int
getNumberOfBuffersInUse()
static long
getPooledBufferDisposalCounter()
static int
getPooledBufferSize()
short
getShort()
short
getShort(int index)
short
getUnsignedByte()
long
getUnsignedInt()
int
getUnsignedShort()
int
getUnsignedShort(int index)
boolean
hasArray()
boolean
hasRemaining()
boolean
hasRemaining(int atLeast)
static QpidByteBuffer
inflate(QpidByteBuffer compressedBuffer)
static void
initialisePool(int bufferSize, int maxPoolSize, double sparsityFraction)
boolean
isDirect()
boolean
isSparse()
int
limit()
QpidByteBuffer
limit(int newLimit)
QpidByteBuffer
mark()
int
position()
QpidByteBuffer
position(int newPosition)
QpidByteBuffer
put(byte b)
QpidByteBuffer
put(byte[] src)
QpidByteBuffer
put(byte[] src, int offset, int length)
QpidByteBuffer
put(int index, byte b)
QpidByteBuffer
put(java.nio.ByteBuffer src)
QpidByteBuffer
put(QpidByteBuffer src)
QpidByteBuffer
putChar(char value)
QpidByteBuffer
putChar(int index, char value)
void
putCopyOf(QpidByteBuffer source)
QpidByteBuffer
putDouble(double value)
QpidByteBuffer
putDouble(int index, double value)
QpidByteBuffer
putFloat(float value)
QpidByteBuffer
putFloat(int index, float value)
QpidByteBuffer
putInt(int value)
QpidByteBuffer
putInt(int index, int value)
QpidByteBuffer
putLong(int index, long value)
QpidByteBuffer
putLong(long value)
QpidByteBuffer
putShort(int index, short value)
QpidByteBuffer
putShort(short value)
QpidByteBuffer
putUnsignedByte(short s)
QpidByteBuffer
putUnsignedInt(long value)
QpidByteBuffer
putUnsignedShort(int i)
long
read(java.nio.channels.ScatteringByteChannel channel)
static QpidByteBuffer
reallocateIfNecessary(QpidByteBuffer data)
int
remaining()
QpidByteBuffer
reset()
static void
returnToPool(java.nio.ByteBuffer buffer)
QpidByteBuffer
rewind()
QpidByteBuffer
slice()
QpidByteBuffer
view(int offset, int length)
static QpidByteBuffer
wrap(byte[] data)
static QpidByteBuffer
wrap(byte[] data, int offset, int length)
static QpidByteBuffer
wrap(java.nio.ByteBuffer wrap)
static long
write(java.nio.channels.GatheringByteChannel channel, java.util.Collection<QpidByteBuffer> qpidByteBuffers)
-
-
-
Method Detail
-
allocate
static QpidByteBuffer allocate(boolean direct, int size)
-
allocate
static QpidByteBuffer allocate(int size)
-
allocateDirect
static QpidByteBuffer allocateDirect(int size)
-
asQpidByteBuffer
static QpidByteBuffer asQpidByteBuffer(java.io.InputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
encryptSSL
static javax.net.ssl.SSLEngineResult encryptSSL(javax.net.ssl.SSLEngine engine, java.util.Collection<QpidByteBuffer> buffers, QpidByteBuffer dest) throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
decryptSSL
static javax.net.ssl.SSLEngineResult decryptSSL(javax.net.ssl.SSLEngine engine, QpidByteBuffer src, QpidByteBuffer dst) throws javax.net.ssl.SSLException
- Throws:
javax.net.ssl.SSLException
-
inflate
static QpidByteBuffer inflate(QpidByteBuffer compressedBuffer) throws java.io.IOException
- Throws:
java.io.IOException
-
deflate
static QpidByteBuffer deflate(QpidByteBuffer uncompressedBuffer) throws java.io.IOException
- Throws:
java.io.IOException
-
write
static long write(java.nio.channels.GatheringByteChannel channel, java.util.Collection<QpidByteBuffer> qpidByteBuffers) throws java.io.IOException
- Throws:
java.io.IOException
-
wrap
static QpidByteBuffer wrap(java.nio.ByteBuffer wrap)
-
wrap
static QpidByteBuffer wrap(byte[] data)
-
wrap
static QpidByteBuffer wrap(byte[] data, int offset, int length)
-
initialisePool
static void initialisePool(int bufferSize, int maxPoolSize, double sparsityFraction)
-
deinitialisePool
static void deinitialisePool()
Test use only
-
returnToPool
static void returnToPool(java.nio.ByteBuffer buffer)
-
getPooledBufferSize
static int getPooledBufferSize()
-
getAllocatedDirectMemorySize
static long getAllocatedDirectMemorySize()
-
getNumberOfBuffersInUse
static int getNumberOfBuffersInUse()
-
getNumberOfBuffersInPool
static int getNumberOfBuffersInPool()
-
getPooledBufferDisposalCounter
static long getPooledBufferDisposalCounter()
-
reallocateIfNecessary
static QpidByteBuffer reallocateIfNecessary(QpidByteBuffer data)
-
concatenate
static QpidByteBuffer concatenate(java.util.List<QpidByteBuffer> buffers)
-
concatenate
static QpidByteBuffer concatenate(QpidByteBuffer... buffers)
-
emptyQpidByteBuffer
static QpidByteBuffer emptyQpidByteBuffer()
-
createQpidByteBufferTrackingThreadFactory
static java.util.concurrent.ThreadFactory createQpidByteBufferTrackingThreadFactory(java.util.concurrent.ThreadFactory factory)
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
put
QpidByteBuffer put(int index, byte b)
-
putShort
QpidByteBuffer putShort(int index, short value)
-
putChar
QpidByteBuffer putChar(int index, char value)
-
putInt
QpidByteBuffer putInt(int index, int value)
-
putLong
QpidByteBuffer putLong(int index, long value)
-
putFloat
QpidByteBuffer putFloat(int index, float value)
-
putDouble
QpidByteBuffer putDouble(int index, double value)
-
put
QpidByteBuffer put(byte b)
-
putUnsignedByte
QpidByteBuffer putUnsignedByte(short s)
-
putShort
QpidByteBuffer putShort(short value)
-
putUnsignedShort
QpidByteBuffer putUnsignedShort(int i)
-
putChar
QpidByteBuffer putChar(char value)
-
putInt
QpidByteBuffer putInt(int value)
-
putUnsignedInt
QpidByteBuffer putUnsignedInt(long value)
-
putLong
QpidByteBuffer putLong(long value)
-
putFloat
QpidByteBuffer putFloat(float value)
-
putDouble
QpidByteBuffer putDouble(double value)
-
put
QpidByteBuffer put(byte[] src)
-
put
QpidByteBuffer put(byte[] src, int offset, int length)
-
put
QpidByteBuffer put(java.nio.ByteBuffer src)
-
put
QpidByteBuffer put(QpidByteBuffer src)
-
get
byte get(int index)
-
getShort
short getShort(int index)
-
getUnsignedShort
int getUnsignedShort(int index)
-
getChar
char getChar(int index)
-
getInt
int getInt(int index)
-
getLong
long getLong(int index)
-
getFloat
float getFloat(int index)
-
getDouble
double getDouble(int index)
-
get
byte get()
-
getUnsignedByte
short getUnsignedByte()
-
getShort
short getShort()
-
getUnsignedShort
int getUnsignedShort()
-
getChar
char getChar()
-
getInt
int getInt()
-
getUnsignedInt
long getUnsignedInt()
-
getLong
long getLong()
-
getFloat
float getFloat()
-
getDouble
double getDouble()
-
get
QpidByteBuffer get(byte[] dst)
-
get
QpidByteBuffer get(byte[] dst, int offset, int length)
-
copyTo
void copyTo(byte[] dst)
-
copyTo
void copyTo(java.nio.ByteBuffer dst)
-
putCopyOf
void putCopyOf(QpidByteBuffer source)
-
isDirect
boolean isDirect()
-
dispose
void dispose()
-
asInputStream
java.io.InputStream asInputStream()
-
read
long read(java.nio.channels.ScatteringByteChannel channel) throws java.io.IOException
- Throws:
java.io.IOException
-
reset
QpidByteBuffer reset()
-
rewind
QpidByteBuffer rewind()
-
hasArray
boolean hasArray()
-
array
byte[] array()
-
clear
QpidByteBuffer clear()
-
compact
QpidByteBuffer compact()
-
position
int position()
-
position
QpidByteBuffer position(int newPosition)
-
limit
int limit()
-
limit
QpidByteBuffer limit(int newLimit)
-
mark
QpidByteBuffer mark()
-
remaining
int remaining()
-
hasRemaining
boolean hasRemaining()
-
hasRemaining
boolean hasRemaining(int atLeast)
-
flip
QpidByteBuffer flip()
-
capacity
int capacity()
-
duplicate
QpidByteBuffer duplicate()
-
slice
QpidByteBuffer slice()
-
view
QpidByteBuffer view(int offset, int length)
-
isSparse
boolean isSparse()
-
-