Package com.automation_pros.odva.endian
Interface EndianDataInput
-
- All Superinterfaces:
java.io.DataInput
- All Known Implementing Classes:
EndianInputStream,EndianInputWrapper,EndianNioInput
public interface EndianDataInput extends java.io.DataInputDefine input streams that can retrieve little-endian items in addition to the standard big-endian primitives. Note that the underlying UTF8 handling in the DataInput interface expects an unsigned short prefix to UTF8 encodings containing the number of encoded bytes. The method names are inspired by Netty 4.1.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EndianDataInputasLimitedInput(long limit)Returns an instance that reads from the current data source up to the number of bytes specified.charreadCharLE()Little-endian alternative to readChar()doublereadDoubleLE()Little-endian alternative to readDouble()floatreadFloatLE()Little-endian alternative to readFloat()intreadIntLE()Little-endian alternative to readInt()longreadLongLE()Little-endian alternative to readLong()shortreadShortLE()Little-endian alternative to readShort()longreadUnsignedInt()Extension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned integer in a long.longreadUnsignedIntLE()Little-endian alternative to readUnsignedInt()java.math.BigIntegerreadUnsignedLong()Extension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned long in a bignum.java.math.BigIntegerreadUnsignedLongLE()Little-endian alternative to readUnsignedLong()intreadUnsignedShortLE()Little-endian alternative to readUnsignedShort()
-
-
-
Method Detail
-
readShortLE
short readShortLE() throws java.io.IOExceptionLittle-endian alternative to readShort()- Returns:
- Throws:
java.io.IOException
-
readCharLE
char readCharLE() throws java.io.IOExceptionLittle-endian alternative to readChar()- Returns:
- Throws:
java.io.IOException
-
readDoubleLE
double readDoubleLE() throws java.io.IOExceptionLittle-endian alternative to readDouble()- Returns:
- Throws:
java.io.IOException
-
readFloatLE
float readFloatLE() throws java.io.IOExceptionLittle-endian alternative to readFloat()- Returns:
- Throws:
java.io.IOException
-
readIntLE
int readIntLE() throws java.io.IOExceptionLittle-endian alternative to readInt()- Returns:
- Throws:
java.io.IOException
-
readLongLE
long readLongLE() throws java.io.IOExceptionLittle-endian alternative to readLong()- Returns:
- Throws:
java.io.IOException
-
readUnsignedShortLE
int readUnsignedShortLE() throws java.io.IOExceptionLittle-endian alternative to readUnsignedShort()- Returns:
- Throws:
java.io.IOException
-
readUnsignedInt
long readUnsignedInt() throws java.io.IOExceptionExtension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned integer in a long.- Returns:
- Throws:
java.io.IOException
-
readUnsignedIntLE
long readUnsignedIntLE() throws java.io.IOExceptionLittle-endian alternative to readUnsignedInt()- Returns:
- Throws:
java.io.IOException
-
readUnsignedLong
java.math.BigInteger readUnsignedLong() throws java.io.IOExceptionExtension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned long in a bignum.- Returns:
- Throws:
java.io.IOException
-
readUnsignedLongLE
java.math.BigInteger readUnsignedLongLE() throws java.io.IOExceptionLittle-endian alternative to readUnsignedLong()- Returns:
- Throws:
java.io.IOException
-
asLimitedInput
EndianDataInput asLimitedInput(long limit)
Returns an instance that reads from the current data source up to the number of bytes specified.- Parameters:
limit- Number of bytes to read from this subordinate source before signalling end of file. Underlying implementations may truncate this to 32 bits.- Returns:
-
-