Class ByteOrderDataInStream
java.lang.Object
org.locationtech.jts.io.ByteOrderDataInStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetCount()Gets the number of bytes read from the stream.byte[]getData()Gets the data item that was last read from the stream.bytereadByte()Reads a byte value.doubleReads a double value.intreadInt()Reads an int value.longreadLong()Reads a long value.voidsetInStream(InStream stream) Allows a single ByteOrderDataInStream to be reused on multiple InStreams.voidsetOrder(int byteOrder) Sets the ordering on the stream using the codes inByteOrderValues.
-
Constructor Details
-
ByteOrderDataInStream
public ByteOrderDataInStream() -
ByteOrderDataInStream
-
-
Method Details
-
setInStream
Allows a single ByteOrderDataInStream to be reused on multiple InStreams.- Parameters:
stream-
-
setOrder
public void setOrder(int byteOrder) Sets the ordering on the stream using the codes inByteOrderValues.- Parameters:
byteOrder- the byte order code
-
getCount
public long getCount()Gets the number of bytes read from the stream.- Returns:
- the number of bytes read
-
getData
public byte[] getData()Gets the data item that was last read from the stream.- Returns:
- the data last read
-
readByte
Reads a byte value.- Returns:
- the value read
- Throws:
IOException- if an I/O error occurredParseException- if not enough data could be read
-
readInt
Reads an int value.- Returns:
- the value read
- Throws:
IOException- if an I/O error occurredParseException- if not enough data could be read
-
readLong
Reads a long value.- Returns:
- the value read
- Throws:
IOException- if an I/O error occurredParseException- if not enough data could be read
-
readDouble
Reads a double value.- Returns:
- the value read
- Throws:
IOException- if an I/O error occurredParseException- if not enough data could be read
-