public interface BytesOutput<T extends BytesOutput<T>>
This interface exposes methods for writing bytes to specific positions in a byte array.
| Modifier and Type | Method and Description |
|---|---|
T |
flush()
Flushes the bytes to the underlying persistence layer.
|
T |
write(int offset,
byte[] src,
int srcOffset,
int length)
Writes an array of bytes to the buffer.
|
T |
write(int offset,
Bytes src,
int srcOffset,
int length)
Writes an array of bytes to the buffer.
|
T |
writeBoolean(int offset,
boolean b)
Writes a 1 byte boolean to the buffer at the given offset.
|
T |
writeByte(int offset,
int b)
Writes a byte to the buffer at the given offset.
|
T |
writeChar(int offset,
char c)
Writes a 16-bit character to the buffer at the given offset.
|
T |
writeDouble(int offset,
double d)
Writes a double-precision 64-bit floating point number to the buffer at the given offset.
|
T |
writeFloat(int offset,
float f)
Writes a single-precision 32-bit floating point number to the buffer at the given offset.
|
T |
writeInt(int offset,
int i)
Writes a 32-bit signed integer to the buffer at the given offset.
|
T |
writeLong(int offset,
long l)
Writes a 64-bit signed integer to the buffer at the given offset.
|
T |
writeMedium(int offset,
int m)
Writes a 24-bit signed integer to the buffer at the given offset.
|
T |
writeShort(int offset,
short s)
Writes a 16-bit signed integer to the buffer at the given offset.
|
T |
writeString(int offset,
String s)
Writes a string to the buffer at the given offset.
|
T |
writeString(int offset,
String s,
Charset charset)
Writes a string to the buffer at the given offset.
|
T |
writeUnsignedByte(int offset,
int b)
Writes an unsigned byte to the buffer at the given position.
|
T |
writeUnsignedInt(int offset,
long i)
Writes a 32-bit unsigned integer to the buffer at the given offset.
|
T |
writeUnsignedMedium(int offset,
int m)
Writes a 24-bit unsigned integer to the buffer at the given offset.
|
T |
writeUnsignedShort(int offset,
int s)
Writes a 16-bit unsigned integer to the buffer at the given offset.
|
T |
writeUTF8(int offset,
String s)
Writes a UTF-8 string to the buffer at the given offset.
|
T |
zero()
Zeros out all bytes in the array.
|
T |
zero(int offset)
Zeros out all bytes starting at the given offset in the array.
|
T |
zero(int offset,
int length)
Zeros out bytes starting at the given offset up to the given length.
|
T zero()
T zero(int offset)
offset - The offset at which to start zeroing out bytes.T zero(int offset, int length)
offset - The offset at which to start zeroing out bytes.length - THe total number of bytes to zero out.T write(int offset, Bytes src, int srcOffset, int length)
offset - The offset at which to start writing the bytes.src - The array of bytes to write.srcOffset - The offset at which to start reading bytes from the given source.length - The number of bytes from the provided byte array to write to the buffer.T write(int offset, byte[] src, int srcOffset, int length)
offset - The offset at which to start writing the bytes.src - The array of bytes to write.srcOffset - The offset at which to start reading bytes from the given source.length - The number of bytes from the provided byte array to write to the buffer.T writeByte(int offset, int b)
offset - The offset at which to write the byte.b - The byte to write.T writeUnsignedByte(int offset, int b)
offset - The offset at which to write the byte.b - The byte to write.T writeChar(int offset, char c)
offset - The offset at which to write the character.c - The character to write.T writeShort(int offset, short s)
offset - The offset at which to write the short.s - The short to write.T writeUnsignedShort(int offset, int s)
offset - The offset at which to write the short.s - The short to write.T writeMedium(int offset, int m)
offset - The offset at which to write the short.m - The short to write.T writeUnsignedMedium(int offset, int m)
offset - The offset at which to write the short.m - The short to write.T writeInt(int offset, int i)
offset - The offset at which to write the integer.i - The integer to write.T writeUnsignedInt(int offset, long i)
offset - The offset at which to write the integer.i - The integer to write.T writeLong(int offset, long l)
offset - The offset at which to write the long.l - The long to write.T writeFloat(int offset, float f)
offset - The offset at which to write the float.f - The float to write.T writeDouble(int offset, double d)
offset - The offset at which to write the double.d - The double to write.T writeBoolean(int offset, boolean b)
offset - The offset at which to write the boolean.b - The boolean to write.T writeString(int offset, String s)
offset - The offset at which to write the string.s - The string to write.T writeString(int offset, String s, Charset charset)
offset - The offset at which to write the string.s - The string to write.charset - The character set with which to encode the string.T writeUTF8(int offset, String s)
offset - The offset at which to write the string.s - The string to write.T flush()
Copyright © 2013–2017. All rights reserved.