Package arc.util.io

Class Reads

java.lang.Object
arc.util.io.Reads
All Implemented Interfaces:
Closeable, AutoCloseable

public class Reads extends Object implements Closeable
A wrapper for DataInput with more concise method names and no IOExceptions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    b()
    read byte
    byte[]
    b(byte[] array)
    read byte array
    byte[]
    b(byte[] array, int offset, int length)
    read byte array w/ offset
    byte[]
    b(int length)
    allocate & read byte array
    boolean
    read boolean
    int
     
    void
     
    double
    d()
    read double
    float
    f()
    read float
    static Reads
    get(DataInput input)
     
    int
    i()
    read int
    long
    l()
    read long
    short
    s()
    read short
    void
    skip(int amount)
    skip bytes
    str()
    read string (UTF)
    int
    ub()
    read unsigned byte
    int
    us()
    read unsigned short

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public static Reads get(DataInput input)
    • checkEOF

      public int checkEOF()
      Returns:
      -1 if EOF or unsupported, or the next byte.
    • l

      public long l()
      read long
    • i

      public int i()
      read int
    • s

      public short s()
      read short
    • us

      public int us()
      read unsigned short
    • b

      public byte b()
      read byte
    • b

      public byte[] b(int length)
      allocate & read byte array
    • b

      public byte[] b(byte[] array)
      read byte array
    • b

      public byte[] b(byte[] array, int offset, int length)
      read byte array w/ offset
    • ub

      public int ub()
      read unsigned byte
    • bool

      public boolean bool()
      read boolean
    • f

      public float f()
      read float
    • d

      public double d()
      read double
    • str

      public String str()
      read string (UTF)
    • skip

      public void skip(int amount)
      skip bytes
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable