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(long offset,
byte[] src,
long srcOffset,
long length)
Writes an array of bytes to the buffer.
|
T |
write(long offset,
Bytes src,
long srcOffset,
long length)
Writes an array of bytes to the buffer.
|
T |
writeBoolean(long offset,
boolean b)
Writes a 1 byte boolean to the buffer at the given offset.
|
T |
writeByte(long offset,
int b)
Writes a byte to the buffer at the given offset.
|
T |
writeChar(long offset,
char c)
Writes a 16-bit character to the buffer at the given offset.
|
T |
writeDouble(long offset,
double d)
Writes a double-precision 64-bit floating point number to the buffer at the given offset.
|
T |
writeFloat(long offset,
float f)
Writes a single-precision 32-bit floating point number to the buffer at the given offset.
|
T |
writeInt(long offset,
int i)
Writes a 32-bit signed integer to the buffer at the given offset.
|
T |
writeLong(long offset,
long l)
Writes a 64-bit signed integer to the buffer at the given offset.
|
T |
writeMedium(long offset,
int m)
Writes a 24-bit signed integer to the buffer at the given offset.
|
T |
writeShort(long offset,
short s)
Writes a 16-bit signed integer to the buffer at the given offset.
|
T |
writeString(long offset,
String s)
Writes a string to the buffer at the given offset.
|
T |
writeUnsignedByte(long offset,
int b)
Writes an unsigned byte to the buffer at the given position.
|
T |
writeUnsignedInt(long offset,
long i)
Writes a 32-bit unsigned integer to the buffer at the given offset.
|
T |
writeUnsignedMedium(long offset,
int m)
Writes a 24-bit unsigned integer to the buffer at the given offset.
|
T |
writeUnsignedShort(long offset,
int s)
Writes a 16-bit unsigned integer to the buffer at the given offset.
|
T |
writeUTF8(long 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(long offset)
Zeros out all bytes starting at the given offset in the array.
|
T |
zero(long offset,
long length)
Zeros out bytes starting at the given offset up to the given length.
|
T zero()
T zero(long offset)
offset - The offset at which to start zeroing out bytes.T zero(long offset, long length)
offset - The offset at which to start zeroing out bytes.length - THe total number of bytes to zero out.T write(long offset, Bytes src, long srcOffset, long 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(long offset, byte[] src, long srcOffset, long 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(long offset, int b)
offset - The offset at which to write the byte.b - The byte to write.T writeUnsignedByte(long offset, int b)
offset - The offset at which to write the byte.b - The byte to write.T writeChar(long offset, char c)
offset - The offset at which to write the character.c - The character to write.T writeShort(long offset, short s)
offset - The offset at which to write the short.s - The short to write.T writeUnsignedShort(long offset, int s)
offset - The offset at which to write the short.s - The short to write.T writeMedium(long offset, int m)
offset - The offset at which to write the short.m - The short to write.T writeUnsignedMedium(long offset, int m)
offset - The offset at which to write the short.m - The short to write.T writeInt(long offset, int i)
offset - The offset at which to write the integer.i - The integer to write.T writeUnsignedInt(long offset, long i)
offset - The offset at which to write the integer.i - The integer to write.T writeLong(long offset, long l)
offset - The offset at which to write the long.l - The long to write.T writeFloat(long offset, float f)
offset - The offset at which to write the float.f - The float to write.T writeDouble(long offset, double d)
offset - The offset at which to write the double.d - The double to write.T writeBoolean(long offset, boolean b)
offset - The offset at which to write the boolean.b - The boolean to write.T writeString(long offset, String s)
offset - The offset at which to write the string.s - The string to write.T writeUTF8(long offset, String s)
offset - The offset at which to write the string.s - The string to write.T flush()
Copyright © 2013–2015. All rights reserved.