Package io.protostuff
Class LinkBuffer
java.lang.Object
io.protostuff.LinkBuffer
A list of ByteBuffers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
(package private) List
<ByteBuffer> (package private) ByteBuffer
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
ensureCapacity
(int needed) finish()
private void
long
size()
private void
spliceBuffer
(ByteBuffer buf) writeByte
(byte value) writeByteArray
(byte[] value) writeByteArray
(byte[] value, int offset, int length) writeDouble
(double value) writeFloat
(float value) writeInt16
(int value) writeInt16LE
(int value) writeInt32
(int value) writeInt32LE
(int value) writeInt64
(long value) writeInt64LE
(long value) writeVarInt32
(int value) writeVarInt64
(long value)
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
allocSize
public final int allocSize -
current
ByteBuffer current -
buffers
List<ByteBuffer> buffers
-
-
Constructor Details
-
LinkBuffer
public LinkBuffer() -
LinkBuffer
public LinkBuffer(int allocSize)
-
-
Method Details
-
size
public long size() -
getBuffers
-
nextBuffer
private void nextBuffer() -
spliceBuffer
-
ensureCapacity
private void ensureCapacity(int needed) -
finish
-
writeByte
- Throws:
IOException
-
writeInt16
- Throws:
IOException
-
writeInt16LE
- Throws:
IOException
-
writeInt32
- Throws:
IOException
-
writeInt32LE
- Throws:
IOException
-
writeInt64
- Throws:
IOException
-
writeInt64LE
- Throws:
IOException
-
writeVarInt32
- Throws:
IOException
-
writeVarInt64
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeByteArray
- Throws:
IOException
-
writeByteArray
- Throws:
IOException
-
writeByteBuffer
-