public class UnsafeArrayReads extends UnsafeReads
| Constructor and Description |
|---|
UnsafeArrayReads(byte[] buf)
Constructor
|
UnsafeArrayReads(byte[] buf,
int offset,
int length)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
How many bytes are still available?
|
boolean |
endOfInput()
Check if we read everything from the input
|
static int |
getInt(byte[] buf,
int pos)
Get an int at an arbitrary position in a byte[]
|
int |
getPos()
What position in the stream?
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
readLine, readUTF, require, skipBytescanReadInt, canReadLong, close, eof, fill, getBuffer, getInputStream, limit, position, read, read, read, readBytes, readBytes, readBytes, readByteUnsigned, readChars, readDouble, readDoubles, readFloat, readFloats, readInt, readInts, readInts, readLong, readLongs, readLongs, readShorts, readShortUnsigned, readString, readStringBuilder, readVarInt, readVarLong, rewind, setBuffer, setBuffer, setInputStream, setLimit, setPosition, setTotal, skip, skip, totalmark, markSupported, resetpublic UnsafeArrayReads(byte[] buf)
buf - Buffer to read frompublic UnsafeArrayReads(byte[] buf,
int offset,
int length)
buf - Buffer to read fromoffset - Offsetin the buffer to start reading fromlength - Max length of the buffer to readpublic int available()
UnsafeReadsavailable in interface ExtendedDataInputavailable in class UnsafeReadspublic boolean endOfInput()
ExtendedDataInputpublic int getPos()
UnsafeReadsgetPos in interface ExtendedDataInputgetPos in class UnsafeReadspublic void readFully(byte[] b)
throws IOException
IOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic boolean readBoolean()
readBoolean in interface DataInputreadBoolean in class com.esotericsoftware.kryo.io.Inputpublic byte readByte()
public int readUnsignedByte()
throws IOException
IOExceptionpublic short readShort()
public int readUnsignedShort()
throws IOException
IOExceptionpublic char readChar()
public int readInt()
public long readLong()
public float readFloat()
public double readDouble()
readDouble in interface DataInputreadDouble in class com.esotericsoftware.kryo.io.Inputpublic static int getInt(byte[] buf,
int pos)
buf - Buffer to get the int frompos - Position in the buffer to get the int fromCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.