Class ByteOrderDataInStream

java.lang.Object
org.locationtech.jts.io.ByteOrderDataInStream

public class ByteOrderDataInStream extends Object
Allows reading a stream of Java primitive datatypes from an underlying InStream, with the representation being in either common byte ordering.
  • Field Details

    • byteOrder

      private int byteOrder
    • stream

      private InStream stream
    • buf1

      private byte[] buf1
    • buf4

      private byte[] buf4
    • buf8

      private byte[] buf8
  • Constructor Details

    • ByteOrderDataInStream

      public ByteOrderDataInStream()
    • ByteOrderDataInStream

      public ByteOrderDataInStream(InStream stream)
  • Method Details

    • setInStream

      public void setInStream(InStream stream)
      Allows a single ByteOrderDataInStream to be reused on multiple InStreams.
      Parameters:
      stream -
    • setOrder

      public void setOrder(int byteOrder)
    • readByte

      public byte readByte() throws IOException
      Reads a byte value
      Returns:
      the byte read
      Throws:
      IOException
    • readInt

      public int readInt() throws IOException
      Throws:
      IOException
    • readLong

      public long readLong() throws IOException
      Throws:
      IOException
    • readDouble

      public double readDouble() throws IOException
      Throws:
      IOException