Package | Description |
---|---|
com.esotericsoftware.kryo.io | |
com.esotericsoftware.kryo.unsafe |
Modifier and Type | Method and Description |
---|---|
boolean |
Input.canReadInt()
Returns true if enough bytes are available to read an int with
Input.readInt(boolean) . |
boolean |
Input.canReadLong()
Returns true if enough bytes are available to read a long with
Input.readLong(boolean) . |
boolean |
ByteBufferInput.canReadVarInt() |
boolean |
Input.canReadVarInt()
Returns true if enough bytes are available to read an int with
Input.readVarInt(boolean) . |
boolean |
ByteBufferInput.canReadVarLong() |
boolean |
Input.canReadVarLong()
Returns true if enough bytes are available to read a long with
Input.readVarLong(boolean) . |
void |
ByteBufferInput.close() |
void |
Input.close()
Closes the underlying InputStream, if any.
|
void |
Output.close()
Flushes any buffered bytes and closes the underlying OutputStream, if any.
|
void |
ByteBufferOutput.close() |
protected int |
InputChunked.fill(byte[] buffer,
int offset,
int count) |
protected int |
Input.fill(byte[] buffer,
int offset,
int count)
Fills the buffer with more bytes.
|
protected int |
ByteBufferInput.fill(java.nio.ByteBuffer buffer,
int offset,
int count)
Fills the buffer with more bytes.
|
void |
Output.flush()
Flushes the buffered bytes.
|
void |
ByteBufferOutput.flush() |
void |
OutputChunked.flush() |
protected int |
ByteBufferInput.optional(int optional)
Fills the buffer with at least the number of bytes specified, if possible.
|
protected int |
Input.optional(int optional)
Fills the buffer with at least the number of bytes specified, if possible.
|
int |
ByteBufferInput.read() |
int |
Input.read()
Reads a single byte as an int from 0 to 255, or -1 if there are no more bytes are available.
|
int |
ByteBufferInput.read(byte[] bytes) |
int |
Input.read(byte[] bytes)
Reads bytes.length bytes or less and writes them to the specified byte[], starting at 0, and returns the number of bytes
read.
|
int |
ByteBufferInput.read(byte[] bytes,
int offset,
int count) |
int |
Input.read(byte[] bytes,
int offset,
int count)
Reads count bytes or less and writes them to the specified byte[], starting at offset, and returns the number of bytes read
or -1 if no more bytes are available.
|
boolean |
ByteBufferInput.readBoolean() |
boolean |
Input.readBoolean()
Reads a 1 byte boolean.
|
boolean[] |
ByteBufferInput.readBooleans(int length) |
boolean[] |
Input.readBooleans(int length)
Reads a boolean array in bulk.
|
byte |
ByteBufferInput.readByte() |
byte |
Input.readByte()
Reads a single byte.
|
void |
Input.readBytes(byte[] bytes)
Reads bytes.length bytes and writes them to the specified byte[], starting at index 0.
|
void |
ByteBufferInput.readBytes(byte[] bytes,
int offset,
int count) |
void |
Input.readBytes(byte[] bytes,
int offset,
int count)
Reads count bytes and writes them to the specified byte[], starting at offset.
|
byte[] |
ByteBufferInput.readBytes(int length) |
byte[] |
Input.readBytes(int length)
Reads the specified number of bytes into a new byte[].
|
int |
ByteBufferInput.readByteUnsigned() |
int |
Input.readByteUnsigned()
Reads a byte as an int from 0 to 255.
|
char |
ByteBufferInput.readChar() |
char |
Input.readChar()
Reads a 2 byte char.
|
char[] |
ByteBufferInput.readChars(int length) |
char[] |
Input.readChars(int length)
Reads a char array in bulk.
|
double |
ByteBufferInput.readDouble() |
double |
Input.readDouble()
Reads an 8 byte double.
|
double[] |
ByteBufferInput.readDoubles(int length) |
double[] |
Input.readDoubles(int length)
Reads a double array in bulk.
|
float |
ByteBufferInput.readFloat() |
float |
Input.readFloat()
Reads a 4 byte float.
|
float[] |
ByteBufferInput.readFloats(int length) |
float[] |
Input.readFloats(int length)
Reads a float array in bulk.
|
int |
ByteBufferInput.readInt() |
int |
Input.readInt()
Reads a 4 byte int.
|
int |
Input.readInt(boolean optimizePositive)
Reads an int using fixed or variable length encoding, depending on
Input.setVariableLengthEncoding(boolean) . |
int[] |
ByteBufferInput.readInts(int length) |
int[] |
Input.readInts(int length)
Reads an int array in bulk.
|
int[] |
Input.readInts(int length,
boolean optimizePositive)
Reads an int array in bulk using fixed or variable length encoding, depending on
Input.setVariableLengthEncoding(boolean) . |
long |
ByteBufferInput.readLong() |
long |
Input.readLong()
Reads an 8 byte long.
|
long |
Input.readLong(boolean optimizePositive)
Reads a long using fixed or variable length encoding, depending on
Input.setVariableLengthEncoding(boolean) . |
long[] |
ByteBufferInput.readLongs(int length) |
long[] |
Input.readLongs(int length)
Reads a long array in bulk.
|
long[] |
Input.readLongs(int length,
boolean optimizePositive)
Reads an int array in bulk using fixed or variable length encoding, depending on
Input.setVariableLengthEncoding(boolean) . |
short |
ByteBufferInput.readShort() |
short |
Input.readShort()
Reads a 2 byte short.
|
short[] |
ByteBufferInput.readShorts(int length) |
short[] |
Input.readShorts(int length)
Reads a short array in bulk.
|
int |
ByteBufferInput.readShortUnsigned() |
int |
Input.readShortUnsigned()
Reads a 2 byte short as an int from 0 to 65535.
|
double |
Input.readVarDouble(double precision,
boolean optimizePositive)
Reads a 1-9 byte double with reduced precision.
|
float |
Input.readVarFloat(float precision,
boolean optimizePositive)
Reads a 1-5 byte float with reduced precision.
|
int |
ByteBufferInput.readVarInt(boolean optimizePositive) |
int |
Input.readVarInt(boolean optimizePositive)
Reads a 1-5 byte int.
|
long |
ByteBufferInput.readVarLong(boolean optimizePositive) |
long |
Input.readVarLong(boolean optimizePositive)
Reads a 1-9 byte long.
|
protected int |
ByteBufferInput.require(int required) |
protected int |
Input.require(int required)
Fills the buffer with at least the number of bytes specified.
|
protected boolean |
Output.require(int required)
Ensures the buffer is large enough to read the specified number of bytes.
|
protected boolean |
ByteBufferOutput.require(int required) |
void |
ByteBufferInput.skip(int count) |
void |
Input.skip(int count)
Discards the specified number of bytes.
|
long |
ByteBufferInput.skip(long count) |
long |
Input.skip(long count)
Discards the specified number of bytes.
|
void |
Output.write(byte[] bytes)
Writes the bytes.
|
void |
ByteBufferOutput.write(byte[] bytes) |
void |
Output.write(byte[] bytes,
int offset,
int length)
Writes the bytes.
|
void |
ByteBufferOutput.write(byte[] bytes,
int offset,
int length) |
void |
Output.write(int value)
Writes a byte.
|
void |
ByteBufferOutput.write(int value) |
void |
Output.writeAscii(java.lang.String value)
Writes a string that is known to contain only ASCII characters.
|
void |
ByteBufferOutput.writeAscii(java.lang.String value) |
void |
Output.writeBoolean(boolean value)
Writes a 1 byte boolean.
|
void |
ByteBufferOutput.writeBoolean(boolean value) |
void |
Output.writeBooleans(boolean[] array,
int offset,
int count)
Writes a boolean array in bulk.
|
void |
ByteBufferOutput.writeBooleans(boolean[] array,
int offset,
int count) |
void |
Output.writeByte(byte value) |
void |
ByteBufferOutput.writeByte(byte value) |
void |
Output.writeByte(int value) |
void |
ByteBufferOutput.writeByte(int value) |
void |
Output.writeBytes(byte[] bytes)
Writes the bytes.
|
void |
ByteBufferOutput.writeBytes(byte[] bytes) |
void |
Output.writeBytes(byte[] bytes,
int offset,
int count)
Writes the bytes.
|
void |
ByteBufferOutput.writeBytes(byte[] bytes,
int offset,
int count) |
void |
Output.writeChar(char value)
Writes a 2 byte char.
|
void |
ByteBufferOutput.writeChar(char value) |
void |
Output.writeChars(char[] array,
int offset,
int count)
Writes a char array in bulk.
|
void |
ByteBufferOutput.writeChars(char[] array,
int offset,
int count) |
void |
Output.writeDouble(double value)
Writes an 8 byte double.
|
void |
ByteBufferOutput.writeDouble(double value) |
void |
Output.writeDoubles(double[] array,
int offset,
int count)
Writes a double array in bulk.
|
void |
ByteBufferOutput.writeDoubles(double[] array,
int offset,
int count) |
void |
Output.writeFloat(float value)
Writes a 4 byte float.
|
void |
ByteBufferOutput.writeFloat(float value) |
void |
Output.writeFloats(float[] array,
int offset,
int count)
Writes a float array in bulk.
|
void |
ByteBufferOutput.writeFloats(float[] array,
int offset,
int count) |
void |
Output.writeInt(int value)
Writes a 4 byte int.
|
void |
ByteBufferOutput.writeInt(int value) |
int |
Output.writeInt(int value,
boolean optimizePositive)
Reads an int using fixed or variable length encoding, depending on
Output.setVariableLengthEncoding(boolean) . |
void |
Output.writeInts(int[] array,
int offset,
int count)
Writes an int array in bulk.
|
void |
ByteBufferOutput.writeInts(int[] array,
int offset,
int count) |
void |
Output.writeInts(int[] array,
int offset,
int count,
boolean optimizePositive)
Writes an int array in bulk using fixed or variable length encoding, depending on
Output.setVariableLengthEncoding(boolean) . |
void |
Output.writeLong(long value)
Writes an 8 byte long.
|
void |
ByteBufferOutput.writeLong(long value) |
int |
Output.writeLong(long value,
boolean optimizePositive)
Reads a long using fixed or variable length encoding, depending on
Output.setVariableLengthEncoding(boolean) . |
void |
Output.writeLongs(long[] array,
int offset,
int count)
Writes a long array in bulk.
|
void |
ByteBufferOutput.writeLongs(long[] array,
int offset,
int count) |
void |
Output.writeLongs(long[] array,
int offset,
int count,
boolean optimizePositive)
Writes a long array in bulk using fixed or variable length encoding, depending on
Output.setVariableLengthEncoding(boolean) . |
void |
Output.writeShort(int value)
Writes a 2 byte short.
|
void |
ByteBufferOutput.writeShort(int value) |
void |
Output.writeShorts(short[] array,
int offset,
int count)
Writes a short array in bulk.
|
void |
ByteBufferOutput.writeShorts(short[] array,
int offset,
int count) |
void |
Output.writeString(java.lang.String value)
Writes the length and string, or null.
|
void |
ByteBufferOutput.writeString(java.lang.String value) |
int |
Output.writeVarDouble(double value,
double precision,
boolean optimizePositive)
Writes a 1-9 byte double with reduced precision.
|
int |
Output.writeVarFloat(float value,
float precision,
boolean optimizePositive)
Writes a 1-5 byte float with reduced precision.
|
int |
Output.writeVarInt(int value,
boolean optimizePositive)
Writes a 1-5 byte int.
|
int |
ByteBufferOutput.writeVarInt(int value,
boolean optimizePositive) |
int |
Output.writeVarIntFlag(boolean flag,
int value,
boolean optimizePositive)
Writes a 1-5 byte int, encoding the boolean value with a bit flag.
|
int |
ByteBufferOutput.writeVarIntFlag(boolean flag,
int value,
boolean optimizePositive) |
int |
Output.writeVarLong(long value,
boolean optimizePositive)
Writes a 1-9 byte long.
|
int |
ByteBufferOutput.writeVarLong(long value,
boolean optimizePositive) |
Modifier and Type | Method and Description |
---|---|
int |
UnsafeByteBufferInput.read() |
int |
UnsafeInput.read() |
boolean |
UnsafeByteBufferInput.readBoolean() |
boolean |
UnsafeInput.readBoolean() |
boolean[] |
UnsafeByteBufferInput.readBooleans(int length) |
boolean[] |
UnsafeInput.readBooleans(int length) |
byte |
UnsafeByteBufferInput.readByte() |
byte |
UnsafeInput.readByte() |
void |
UnsafeByteBufferInput.readBytes(byte[] bytes,
int offset,
int count) |
void |
UnsafeInput.readBytes(byte[] bytes,
int offset,
int count) |
void |
UnsafeByteBufferInput.readBytes(java.lang.Object to,
long offset,
int count)
Read count bytes and write them to the object at the given offset inside the in-memory representation of the object.
|
void |
UnsafeInput.readBytes(java.lang.Object to,
long offset,
int count)
Read count bytes and write them to the object at the given offset inside the in-memory representation of the object.
|
int |
UnsafeByteBufferInput.readByteUnsigned() |
int |
UnsafeInput.readByteUnsigned() |
char |
UnsafeByteBufferInput.readChar() |
char |
UnsafeInput.readChar() |
char[] |
UnsafeByteBufferInput.readChars(int length) |
char[] |
UnsafeInput.readChars(int length) |
double |
UnsafeByteBufferInput.readDouble() |
double |
UnsafeInput.readDouble() |
double[] |
UnsafeByteBufferInput.readDoubles(int length) |
double[] |
UnsafeInput.readDoubles(int length) |
float |
UnsafeByteBufferInput.readFloat() |
float |
UnsafeInput.readFloat() |
float[] |
UnsafeByteBufferInput.readFloats(int length) |
float[] |
UnsafeInput.readFloats(int length) |
int |
UnsafeByteBufferInput.readInt() |
int |
UnsafeInput.readInt() |
int[] |
UnsafeByteBufferInput.readInts(int length) |
int[] |
UnsafeInput.readInts(int length) |
long |
UnsafeByteBufferInput.readLong() |
long |
UnsafeInput.readLong() |
long[] |
UnsafeByteBufferInput.readLongs(int length) |
long[] |
UnsafeInput.readLongs(int length) |
short |
UnsafeByteBufferInput.readShort() |
short |
UnsafeInput.readShort() |
short[] |
UnsafeByteBufferInput.readShorts(int length) |
short[] |
UnsafeInput.readShorts(int length) |
protected boolean |
UnsafeByteBufferOutput.require(int required) |
void |
UnsafeByteBufferOutput.write(int value) |
void |
UnsafeOutput.write(int value) |
void |
UnsafeByteBufferOutput.writeBoolean(boolean value) |
void |
UnsafeOutput.writeBoolean(boolean value) |
void |
UnsafeByteBufferOutput.writeBooleans(boolean[] array,
int offset,
int count) |
void |
UnsafeOutput.writeBooleans(boolean[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeByte(byte value) |
void |
UnsafeOutput.writeByte(byte value) |
void |
UnsafeByteBufferOutput.writeByte(int value) |
void |
UnsafeOutput.writeByte(int value) |
void |
UnsafeByteBufferOutput.writeBytes(byte[] array,
int offset,
int count) |
void |
UnsafeOutput.writeBytes(byte[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeBytes(java.lang.Object from,
long offset,
int count)
Write count bytes to the byte buffer, reading from the given offset inside the in-memory representation of the object.
|
void |
UnsafeOutput.writeBytes(java.lang.Object from,
long offset,
int count)
Write count bytes to the byte buffer, reading from the given offset inside the in-memory representation of the object.
|
void |
UnsafeByteBufferOutput.writeChar(char value) |
void |
UnsafeOutput.writeChar(char value) |
void |
UnsafeByteBufferOutput.writeChars(char[] array,
int offset,
int count) |
void |
UnsafeOutput.writeChars(char[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeDouble(double value) |
void |
UnsafeOutput.writeDouble(double value) |
void |
UnsafeByteBufferOutput.writeDoubles(double[] array,
int offset,
int count) |
void |
UnsafeOutput.writeDoubles(double[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeFloat(float value) |
void |
UnsafeOutput.writeFloat(float value) |
void |
UnsafeByteBufferOutput.writeFloats(float[] array,
int offset,
int count) |
void |
UnsafeOutput.writeFloats(float[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeInt(int value) |
void |
UnsafeOutput.writeInt(int value) |
void |
UnsafeByteBufferOutput.writeInts(int[] array,
int offset,
int count) |
void |
UnsafeOutput.writeInts(int[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeLong(long value) |
void |
UnsafeOutput.writeLong(long value) |
void |
UnsafeByteBufferOutput.writeLongs(long[] array,
int offset,
int count) |
void |
UnsafeOutput.writeLongs(long[] array,
int offset,
int count) |
void |
UnsafeByteBufferOutput.writeShort(int value) |
void |
UnsafeOutput.writeShort(int value) |
void |
UnsafeByteBufferOutput.writeShorts(short[] array,
int offset,
int count) |
void |
UnsafeOutput.writeShorts(short[] array,
int offset,
int count) |
Copyright © 2019. All Rights Reserved.