Package com.google.common.io
Interface ByteArrayDataInput
-
- All Superinterfaces:
DataInput
@GwtIncompatible public interface ByteArrayDataInput extends 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
- Author:
- Kevin Bourrillion
-
-
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()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
int
skipBytes(int n)
-
-
-
Method Detail
-
readFully
void readFully(byte[] b, int off, int len)
-
readBoolean
@CanIgnoreReturnValue boolean readBoolean()
- Specified by:
readBoolean
in interfaceDataInput
-
readByte
@CanIgnoreReturnValue byte readByte()
-
readUnsignedByte
@CanIgnoreReturnValue int readUnsignedByte()
- Specified by:
readUnsignedByte
in interfaceDataInput
-
readShort
@CanIgnoreReturnValue short readShort()
-
readUnsignedShort
@CanIgnoreReturnValue int readUnsignedShort()
- Specified by:
readUnsignedShort
in interfaceDataInput
-
readChar
@CanIgnoreReturnValue char readChar()
-
readInt
@CanIgnoreReturnValue int readInt()
-
readLong
@CanIgnoreReturnValue long readLong()
-
readFloat
@CanIgnoreReturnValue float readFloat()
-
readDouble
@CanIgnoreReturnValue double readDouble()
- Specified by:
readDouble
in interfaceDataInput
-
readLine
@CanIgnoreReturnValue @CheckForNull String readLine()
-
readUTF
@CanIgnoreReturnValue String readUTF()
-
-