Package hec.io
Class EndianInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
hec.io.EndianInputStream
- All Implemented Interfaces:
EndianTypes
,Closeable
,DataInput
,AutoCloseable
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
Fields inherited from interface hec.io.EndianTypes
BIG_ENDIAN, LITTLE_ENDIAN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal char
readChar
(int type) like RandomAcessFile.readChar except little endian.final double
readDouble
(int type) like RandomAcessFile.readDouble except little endian.final float
readFloat
(int type) like RandomAcessFile.readFloat except little endian.final int
readInt
(int type) like RandomAcessFile.readInt except little endian.final long
readLong
(int type) like RandomAcessFile.readLong except little endian.final short
readShort
(int type) like RandomAcessFile.readShort except little endian.final int
readUnsignedShort
(int type) like RandomAcessFile.readUnsignedShort except little endian.void
setEndianType
(int type) Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
EndianInputStream
constructors
-
-
Method Details
-
setEndianType
public void setEndianType(int type) -
readShort
like RandomAcessFile.readShort except little endian.- Throws:
IOException
-
readUnsignedShort
like RandomAcessFile.readUnsignedShort except little endian. Note, returns int even though it reads a short.- Throws:
IOException
-
readChar
like RandomAcessFile.readChar except little endian.- Throws:
IOException
-
readInt
like RandomAcessFile.readInt except little endian.- Throws:
IOException
-
readLong
like RandomAcessFile.readLong except little endian.- Throws:
IOException
-
readFloat
like RandomAcessFile.readFloat except little endian.- Throws:
IOException
-
readDouble
like RandomAcessFile.readDouble except little endian.- Throws:
IOException
-