Package com.esotericsoftware.kryo.io
Class KryoDataInput
java.lang.Object
com.esotericsoftware.kryo.io.KryoDataInput
- All Implemented Interfaces:
DataInput
- Direct Known Subclasses:
KryoObjectInput
Best attempt adapter for
DataInput
. Currently only readLine()
is unsupported. Other methods behave slightly
differently. For example, readUTF()
may return a null string.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
byte
readByte()
char
readChar()
double
float
void
readFully
(byte[] b) void
readFully
(byte[] b, int off, int len) int
readInt()
readLine()
Deprecated.this method is not supported in this implementation.long
readLong()
short
int
int
readUTF()
Reads the length and string of UTF8 characters, or null.void
int
skipBytes
(int n)
-
Field Details
-
input
-
-
Constructor Details
-
KryoDataInput
-
-
Method Details
-
setInput
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
skipBytes
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
readBoolean
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readChar
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readDouble
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readLine
Deprecated.this method is not supported in this implementation.Not implemented.- Specified by:
readLine
in interfaceDataInput
- Throws:
UnsupportedOperationException
- when called.
-
readUTF
Reads the length and string of UTF8 characters, or null. This can read strings written byKryoDataOutput.writeUTF(String)
,Output.writeString(String)
,Output.writeString(CharSequence)
, andOutput.writeAscii(String)
.- Specified by:
readUTF
in interfaceDataInput
- Returns:
- May be null.
- Throws:
IOException
-