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
inFields inherited from interface hec.io.EndianTypes
BIG_ENDIAN, LITTLE_ENDIAN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal charreadChar(int type) like RandomAcessFile.readChar except little endian.final doublereadDouble(int type) like RandomAcessFile.readDouble except little endian.final floatreadFloat(int type) like RandomAcessFile.readFloat except little endian.final intreadInt(int type) like RandomAcessFile.readInt except little endian.final longreadLong(int type) like RandomAcessFile.readLong except little endian.final shortreadShort(int type) like RandomAcessFile.readShort except little endian.final intreadUnsignedShort(int type) like RandomAcessFile.readUnsignedShort except little endian.voidsetEndianType(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, skipBytesMethods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skipMethods 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
-