Package arc.util.io
Class Reads
java.lang.Object
arc.util.io.Reads
- All Implemented Interfaces:
Closeable,AutoCloseable
A wrapper for DataInput with more concise method names and no IOExceptions.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteb()read bytebyte[]b(byte[] array) read byte arraybyte[]b(byte[] array, int offset, int length) read byte array w/ offsetbyte[]b(int length) allocate & read byte arraybooleanbool()read booleanintcheckEOF()voidclose()doubled()read doublefloatf()read floatstatic ReadsDeprecated.Use the constructor instead.inti()read intlongl()read longshorts()read shortvoidskip(int amount) skip bytesstr()read string (UTF)str(int maxLen) read string (UTF), with an optional max lengthintub()read unsigned byteintus()read unsigned short
-
Field Details
-
input
-
-
Constructor Details
-
Reads
-
-
Method Details
-
get
Deprecated.Use the constructor instead. -
checkEOF
public int checkEOF()- Returns:
- -1 if EOF or unsupported, or the next byte.
-
l
public long l()read long -
i
public int i()read int -
s
public short s()read short -
us
public int us()read unsigned short -
b
public byte b()read byte -
b
public byte[] b(int length) allocate & read byte array -
b
public byte[] b(byte[] array) read byte array -
b
public byte[] b(byte[] array, int offset, int length) read byte array w/ offset -
ub
public int ub()read unsigned byte -
bool
public boolean bool()read boolean -
f
public float f()read float -
d
public double d()read double -
str
read string (UTF) -
skip
public void skip(int amount) skip bytes -
str
read string (UTF), with an optional max length -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-