Package com.google.common.io
Interface ByteArrayDataInput
-
- All Superinterfaces:
java.io.DataInput
public interface ByteArrayDataInput extends java.io.DataInput
An extension ofDataInput
for reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException
.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] b)
void
readFully(byte[] b, int off, int len)
int
readInt()
java.lang.String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
java.lang.String
readUTF()
int
skipBytes(int n)
-
-
-
Method Detail
-
readFully
void readFully(byte[] b)
- Specified by:
readFully
in interfacejava.io.DataInput
-
readFully
void readFully(byte[] b, int off, int len)
- Specified by:
readFully
in interfacejava.io.DataInput
-
skipBytes
int skipBytes(int n)
- Specified by:
skipBytes
in interfacejava.io.DataInput
-
readBoolean
boolean readBoolean()
- Specified by:
readBoolean
in interfacejava.io.DataInput
-
readByte
byte readByte()
- Specified by:
readByte
in interfacejava.io.DataInput
-
readUnsignedByte
int readUnsignedByte()
- Specified by:
readUnsignedByte
in interfacejava.io.DataInput
-
readShort
short readShort()
- Specified by:
readShort
in interfacejava.io.DataInput
-
readUnsignedShort
int readUnsignedShort()
- Specified by:
readUnsignedShort
in interfacejava.io.DataInput
-
readChar
char readChar()
- Specified by:
readChar
in interfacejava.io.DataInput
-
readInt
int readInt()
- Specified by:
readInt
in interfacejava.io.DataInput
-
readLong
long readLong()
- Specified by:
readLong
in interfacejava.io.DataInput
-
readFloat
float readFloat()
- Specified by:
readFloat
in interfacejava.io.DataInput
-
readDouble
double readDouble()
- Specified by:
readDouble
in interfacejava.io.DataInput
-
readLine
java.lang.String readLine()
- Specified by:
readLine
in interfacejava.io.DataInput
-
readUTF
java.lang.String readUTF()
- Specified by:
readUTF
in interfacejava.io.DataInput
-
-