Package org.apache.qpid.proton.codec
Class WritableBuffer.ByteBufferWrapper
- java.lang.Object
-
- org.apache.qpid.proton.codec.WritableBuffer.ByteBufferWrapper
-
- All Implemented Interfaces:
WritableBuffer
- Enclosing interface:
- WritableBuffer
public static class WritableBuffer.ByteBufferWrapper extends java.lang.Object implements WritableBuffer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.qpid.proton.codec.WritableBuffer
WritableBuffer.ByteBufferWrapper
-
-
Constructor Summary
Constructors Constructor Description ByteBufferWrapper(java.nio.ByteBuffer buf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WritableBuffer.ByteBufferWrapper
allocate(int size)
java.nio.ByteBuffer
byteBuffer()
void
ensureRemaining(int remaining)
boolean
hasRemaining()
int
limit()
int
position()
void
position(int position)
void
put(byte b)
void
put(byte[] src, int offset, int length)
void
put(java.lang.String value)
void
put(java.nio.ByteBuffer src)
void
put(ReadableBuffer src)
void
putDouble(double d)
void
putFloat(float f)
void
putInt(int i)
void
putLong(long l)
void
putShort(short s)
int
remaining()
ReadableBuffer
toReadableBuffer()
java.lang.String
toString()
static WritableBuffer.ByteBufferWrapper
wrap(byte[] bytes)
static WritableBuffer.ByteBufferWrapper
wrap(java.nio.ByteBuffer buffer)
-
-
-
Method Detail
-
put
public void put(byte b)
- Specified by:
put
in interfaceWritableBuffer
-
putFloat
public void putFloat(float f)
- Specified by:
putFloat
in interfaceWritableBuffer
-
putDouble
public void putDouble(double d)
- Specified by:
putDouble
in interfaceWritableBuffer
-
put
public void put(byte[] src, int offset, int length)
- Specified by:
put
in interfaceWritableBuffer
-
putShort
public void putShort(short s)
- Specified by:
putShort
in interfaceWritableBuffer
-
putInt
public void putInt(int i)
- Specified by:
putInt
in interfaceWritableBuffer
-
putLong
public void putLong(long l)
- Specified by:
putLong
in interfaceWritableBuffer
-
hasRemaining
public boolean hasRemaining()
- Specified by:
hasRemaining
in interfaceWritableBuffer
-
ensureRemaining
public void ensureRemaining(int remaining)
- Specified by:
ensureRemaining
in interfaceWritableBuffer
-
remaining
public int remaining()
- Specified by:
remaining
in interfaceWritableBuffer
-
position
public int position()
- Specified by:
position
in interfaceWritableBuffer
-
position
public void position(int position)
- Specified by:
position
in interfaceWritableBuffer
-
put
public void put(java.nio.ByteBuffer src)
- Specified by:
put
in interfaceWritableBuffer
-
put
public void put(ReadableBuffer src)
- Specified by:
put
in interfaceWritableBuffer
-
put
public void put(java.lang.String value)
- Specified by:
put
in interfaceWritableBuffer
-
limit
public int limit()
- Specified by:
limit
in interfaceWritableBuffer
-
byteBuffer
public java.nio.ByteBuffer byteBuffer()
-
toReadableBuffer
public ReadableBuffer toReadableBuffer()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
allocate
public static WritableBuffer.ByteBufferWrapper allocate(int size)
-
wrap
public static WritableBuffer.ByteBufferWrapper wrap(java.nio.ByteBuffer buffer)
-
wrap
public static WritableBuffer.ByteBufferWrapper wrap(byte[] bytes)
-
-