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.DataInput
Define 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 EndianDataInput
asLimitedInput(long limit)
Returns an instance that reads from the current data source up to the number of bytes specified.char
readCharLE()
Little-endian alternative to readChar()double
readDoubleLE()
Little-endian alternative to readDouble()float
readFloatLE()
Little-endian alternative to readFloat()int
readIntLE()
Little-endian alternative to readInt()long
readLongLE()
Little-endian alternative to readLong()short
readShortLE()
Little-endian alternative to readShort()long
readUnsignedInt()
Extension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned integer in a long.long
readUnsignedIntLE()
Little-endian alternative to readUnsignedInt()java.math.BigInteger
readUnsignedLong()
Extension to the DataInput interface similar to readUnsignedShort(), but delivering an unsigned long in a bignum.java.math.BigInteger
readUnsignedLongLE()
Little-endian alternative to readUnsignedLong()int
readUnsignedShortLE()
Little-endian alternative to readUnsignedShort()
-
-
-
Method Detail
-
readShortLE
short readShortLE() throws java.io.IOException
Little-endian alternative to readShort()- Returns:
- Throws:
java.io.IOException
-
readCharLE
char readCharLE() throws java.io.IOException
Little-endian alternative to readChar()- Returns:
- Throws:
java.io.IOException
-
readDoubleLE
double readDoubleLE() throws java.io.IOException
Little-endian alternative to readDouble()- Returns:
- Throws:
java.io.IOException
-
readFloatLE
float readFloatLE() throws java.io.IOException
Little-endian alternative to readFloat()- Returns:
- Throws:
java.io.IOException
-
readIntLE
int readIntLE() throws java.io.IOException
Little-endian alternative to readInt()- Returns:
- Throws:
java.io.IOException
-
readLongLE
long readLongLE() throws java.io.IOException
Little-endian alternative to readLong()- Returns:
- Throws:
java.io.IOException
-
readUnsignedShortLE
int readUnsignedShortLE() throws java.io.IOException
Little-endian alternative to readUnsignedShort()- Returns:
- Throws:
java.io.IOException
-
readUnsignedInt
long readUnsignedInt() throws java.io.IOException
Extension 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.IOException
Little-endian alternative to readUnsignedInt()- Returns:
- Throws:
java.io.IOException
-
readUnsignedLong
java.math.BigInteger readUnsignedLong() throws java.io.IOException
Extension 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.IOException
Little-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:
-
-