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, skipBytes
canReadInt, 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, total
mark, markSupported, reset
public 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()
UnsafeReads
available
in interface ExtendedDataInput
available
in class UnsafeReads
public boolean endOfInput()
ExtendedDataInput
public int getPos()
UnsafeReads
getPos
in interface ExtendedDataInput
getPos
in class UnsafeReads
public void readFully(byte[] b) throws IOException
IOException
public void readFully(byte[] b, int off, int len) throws IOException
IOException
public boolean readBoolean()
readBoolean
in interface DataInput
readBoolean
in class com.esotericsoftware.kryo.io.Input
public byte readByte()
public int readUnsignedByte() throws IOException
IOException
public short readShort()
public int readUnsignedShort() throws IOException
IOException
public char readChar()
public int readInt()
public long readLong()
public float readFloat()
public double readDouble()
readDouble
in interface DataInput
readDouble
in class com.esotericsoftware.kryo.io.Input
public 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.