Constructor and Description |
---|
FrameBuilder()
Construct a builder with an initial buffer size of 32 bytes.
|
FrameBuilder(int capacity)
Construct a builder with a given initial buffer size.
|
Modifier and Type | Method and Description |
---|---|
Message.Frame |
build()
Build a frame containing the data in the underlying buffer.
|
Message.FrameBuilder |
putBlob(byte[] bytes)
Put an array of bytes into the buffer as an int and bytes.
|
Message.FrameBuilder |
putBlob(byte[] bytes,
int offset,
int length)
Put an array of bytes into the buffer as an int and bytes.
|
Message.FrameBuilder |
putByte(byte value)
Put a
byte of data into the buffer. |
Message.FrameBuilder |
putBytes(byte[] bytes)
Put an array of bytes into the buffer as a byte and bytes.
|
Message.FrameBuilder |
putBytes(byte[] bytes,
int offset,
int length)
Put an array of bytes into the buffer as a byte and bytes.
|
Message.FrameBuilder |
putClob(String value)
Put an encoded String value into the buffer as an int and bytes
using the default character set.
|
Message.FrameBuilder |
putClobs(List<String> strings)
Put a list of encoded String values into the buffer as an int and clobs
using the default character set.
|
Message.FrameBuilder |
putInt(int value)
Put a
int into the buffer. |
Message.FrameBuilder |
putLong(long value)
Put a
long into the buffer. |
Message.FrameBuilder |
putMap(Map<String,String> map) |
Message.FrameBuilder |
putShort(short value)
Put a
short into the buffer. |
Message.FrameBuilder |
putString(String value)
Put an encoded String value into the buffer as a byte and string
using the default character set.
|
Message.FrameBuilder |
putStrings(List<String> strings)
Put a list of encoded String values into the buffer as an int and strings
using the default character set.
|
public FrameBuilder()
public FrameBuilder(int capacity)
capacity
- The initial size of the bufferpublic Message.FrameBuilder putByte(byte value)
byte
of data into the buffer.value
- A byte of datapublic Message.FrameBuilder putShort(short value)
short
into the buffer.value
- A short valuepublic Message.FrameBuilder putInt(int value)
int
into the buffer.value
- An int valuepublic Message.FrameBuilder putLong(long value)
long
into the buffer.value
- A long valuepublic Message.FrameBuilder putBytes(byte[] bytes)
bytes
- An array of bytespublic Message.FrameBuilder putBytes(byte[] bytes, int offset, int length)
bytes
- An array of bytesoffset
- The offset within the arraylength
- The number of bytes to be readpublic Message.FrameBuilder putString(String value)
value
- A String valuepublic Message.FrameBuilder putStrings(List<String> strings)
strings
- A List of String valuespublic Message.FrameBuilder putBlob(byte[] bytes)
bytes
- An array of bytespublic Message.FrameBuilder putBlob(byte[] bytes, int offset, int length)
bytes
- An array of bytesoffset
- The offset within the arraylength
- The number of bytes to be readpublic Message.FrameBuilder putClob(String value)
value
- A String valuepublic Message.FrameBuilder putClobs(List<String> strings)
strings
- A List of String valuespublic Message.FrameBuilder putMap(Map<String,String> map)
public Message.Frame build()
Copyright © 2019. All rights reserved.