Class EndianDataInputStream
java.lang.Object
org.locationtech.jtstest.testbuilder.io.shapefile.EndianDataInputStream
A class that gives most of the functionality of DataInputStream, but is endian aware.
Uses a real java.io.DataInputStream to actually do the writing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close the streambyteread a byte in BigEndian - the same as LE because its only 1 bytebyteread a byte in LittleEndian - the same as BE because its only 1 bytevoidreadByteLEnum(byte[] b) read a byte in LittleEndian - the same as BE because its only 1 bytedoubleread a 64bit double in BEdoubleread a 64bit double in LEintread a 32bit int in BEintread a 32bit int in LElongread a 64bit long in BElongread a 64bit long in LEshortread a 16bit short in BEshortread a 16bit short in LEintread a byte in BigEndian - the same as LE because its only 1 byte.intread a byte in LittleEndian - the same as BE because its only 1 byte.intskipBytes(int num) skip ahead in the stream
-
Constructor Details
-
EndianDataInputStream
Creates new EndianDataInputStream
-
-
Method Details
-
close
-
readByteBE
read a byte in BigEndian - the same as LE because its only 1 byte- Throws:
IOException
-
readByteLE
read a byte in LittleEndian - the same as BE because its only 1 byte- Throws:
IOException
-
readByteLEnum
read a byte in LittleEndian - the same as BE because its only 1 byte- Throws:
IOException
-
readUnsignedByteBE
read a byte in BigEndian - the same as LE because its only 1 byte. returns int as per java.io.DataStream- Throws:
IOException
-
readUnsignedByteLE
read a byte in LittleEndian - the same as BE because its only 1 byte. returns int as per java.io.DataStream- Throws:
IOException
-
readShortBE
-
readShortLE
-
readIntBE
-
readIntLE
-
readLongBE
-
readLongLE
-
readDoubleBE
-
readDoubleLE
-
skipBytes
skip ahead in the stream- Parameters:
num- number of bytes to read ahead- Throws:
IOException
-