Package com.esotericsoftware.kryo.io
Class KryoDataInput
- java.lang.Object
-
- com.esotericsoftware.kryo.io.KryoDataInput
-
- All Implemented Interfaces:
DataInput,AutoCloseable
- Direct Known Subclasses:
KryoObjectInput
public class KryoDataInput extends Object implements DataInput, AutoCloseable
ADataInputwhich reads from anInput.readLine()is unsupported. Other methods behave slightly differently, egreadUTF()may return a null string.- Author:
- Robert DiFalco
-
-
Constructor Summary
Constructors Constructor Description KryoDataInput(Input input)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()booleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()floatreadFloat()voidreadFully(byte[] b)voidreadFully(byte[] b, int off, int len)intreadInt()StringreadLine()Deprecated.this method is not supported in this implementation.longreadLong()shortreadShort()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()Reads the length and string of UTF8 characters, or null.voidsetInput(Input input)intskipBytes(int n)
-
-
-
Field Detail
-
input
protected Input input
-
-
Constructor Detail
-
KryoDataInput
public KryoDataInput(Input input)
-
-
Method Detail
-
setInput
public void setInput(Input input)
-
readFully
public void readFully(byte[] b) throws IOException- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws IOException- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skipBytes
public int skipBytes(int n) throws IOException- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
public byte readByte() throws IOException- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
public short readShort() throws IOException- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readChar
public char readChar() throws IOException- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readInt
public int readInt() throws IOException- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLong
public long readLong() throws IOException- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readFloat
public float readFloat() throws IOException- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readDouble
public double readDouble() throws IOException- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readLine
public String readLine() throws UnsupportedOperationException
Deprecated.this method is not supported in this implementation.Not implemented.- Specified by:
readLinein interfaceDataInput- Throws:
UnsupportedOperationException- when called.
-
readUTF
public String readUTF() throws IOException
Reads the length and string of UTF8 characters, or null. This can read strings written byKryoDataOutput.writeUTF(String),Output.writeString(String), andOutput.writeAscii(String).- Specified by:
readUTFin interfaceDataInput- Returns:
- May be null.
- Throws:
IOException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-