Package com.google.common.io
Interface ByteArrayDataInput
- All Superinterfaces:
DataInput
- All Known Implementing Classes:
ByteStreams.ByteArrayDataInputStream
An extension of
DataInput
for reading from in-memory byte arrays; its methods offer
identical functionality but do not throw IOException
.
Warning: The caller is responsible for not attempting to read past the end of the
array. If any method encounters the end of the array prematurely, it throws IllegalStateException
to signify programmer error. This behavior is a technical violation
of the supertype's contract, which specifies a checked exception.
- Since:
- 1.0
-
Method Details
-
readFully
void readFully(byte[] b) -
readFully
void readFully(byte[] b, int off, int len) -
skipBytes
int skipBytes(int n) -
readBoolean
boolean readBoolean()- Specified by:
readBoolean
in interfaceDataInput
-
readByte
byte readByte() -
readUnsignedByte
int readUnsignedByte()- Specified by:
readUnsignedByte
in interfaceDataInput
-
readShort
short readShort() -
readUnsignedShort
int readUnsignedShort()- Specified by:
readUnsignedShort
in interfaceDataInput
-
readChar
char readChar() -
readInt
int readInt() -
readLong
long readLong() -
readFloat
float readFloat() -
readDouble
double readDouble()- Specified by:
readDouble
in interfaceDataInput
-
readLine
-
readUTF
String readUTF()
-