Package org.vast.swe
Class DataInputStreamBI
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.vast.swe.DataInputStreamBI
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
,DataInputExt
Extension of DataInputStream to support reading unsigned int and long values as well as ASCII (0 terminated) strings from byte stream. This is for big endian order (i.e. Most Significant Byte first)
- Since:
- Nov 28, 2005
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReads a 0 terminated ASCII string from input streamlong
Reads 4 input bytes and returns a long value in the range 0-2^32.long
Reads 8 input bytes and returns a long value in the range 0-2^63.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
Methods inherited from interface org.vast.cdm.common.DataInputExt
mark, read, reset
-
Constructor Details
-
DataInputStreamBI
-
-
Method Details
-
readUnsignedInt
Description copied from interface:DataInputExt
Reads 4 input bytes and returns a long value in the range 0-2^32.- Specified by:
readUnsignedInt
in interfaceDataInputExt
- Returns:
- long value
- Throws:
IOException
-
readUnsignedLong
Description copied from interface:DataInputExt
Reads 8 input bytes and returns a long value in the range 0-2^63. Values greater than 2^63 won't be read correctly since they are not supported by java.- Specified by:
readUnsignedLong
in interfaceDataInputExt
- Returns:
- long value
- Throws:
IOException
-
readASCII
Description copied from interface:DataInputExt
Reads a 0 terminated ASCII string from input stream- Specified by:
readASCII
in interfaceDataInputExt
- Returns:
- string value
- Throws:
IOException
-