Package hec.io

Class EndianInputStream

All Implemented Interfaces:
EndianTypes, Closeable, DataInput, AutoCloseable

public class EndianInputStream extends DataInputStream implements EndianTypes
  • Constructor Details

    • EndianInputStream

      public EndianInputStream(InputStream is)
      constructors
  • Method Details

    • setEndianType

      public void setEndianType(int type)
    • readShort

      public final short readShort(int type) throws IOException
      like RandomAcessFile.readShort except little endian.
      Throws:
      IOException
    • readUnsignedShort

      public final int readUnsignedShort(int type) throws IOException
      like RandomAcessFile.readUnsignedShort except little endian. Note, returns int even though it reads a short.
      Throws:
      IOException
    • readChar

      public final char readChar(int type) throws IOException
      like RandomAcessFile.readChar except little endian.
      Throws:
      IOException
    • readInt

      public final int readInt(int type) throws IOException
      like RandomAcessFile.readInt except little endian.
      Throws:
      IOException
    • readLong

      public final long readLong(int type) throws IOException
      like RandomAcessFile.readLong except little endian.
      Throws:
      IOException
    • readFloat

      public final float readFloat(int type) throws IOException
      like RandomAcessFile.readFloat except little endian.
      Throws:
      IOException
    • readDouble

      public final double readDouble(int type) throws IOException
      like RandomAcessFile.readDouble except little endian.
      Throws:
      IOException