Class DataInput

java.lang.Object
net.arnx.wmf2svg.io.DataInput

public class DataInput extends Object
Author:
Hidekatsu Izuno
  • Constructor Details

    • DataInput

      public DataInput(InputStream in)
      Create a DataInput class instance using by native order.
      Parameters:
      in - the input stream that had better buffer by a BufferedInputStream.
    • DataInput

      public DataInput(InputStream in, ByteOrder endian)
      Create a DataInput class instance.
      Parameters:
      in - the input stream that had better buffer by a BufferedInputStream.
      endian - the endian of the input stream
  • Method Details

    • readByte

      public int readByte() throws IOException, EOFException
      Reads the next one byte of this input stream as a signed 8-bit integer.
      Returns:
      the int value as a signed 8-bit integer.
      Throws:
      IOException - if an I/O error occurs.
      EOFException - if this stream reaches the end before reading all the bytes.
    • readInt16

      public int readInt16() throws IOException, EOFException
      Reads the next two bytes of this input stream as a signed 16-bit integer.
      Returns:
      the int value as a signed 16-bit integer.
      Throws:
      IOException - if an I/O error occurs.
      EOFException - if this stream reaches the end before reading all the bytes.
    • readInt32

      public int readInt32() throws IOException, EOFException
      Reads the next four bytes of this input stream as a signed 32-bit integer.
      Returns:
      the int value as a signed 32-bit integer.
      Throws:
      IOException - if an I/O error occurs.
      EOFException - if this stream reaches the end before reading all the bytes.
    • readUint16

      public int readUint16() throws IOException, EOFException
      Reads the next two bytes of this input stream as a unsigned 16-bit integer.
      Returns:
      the int value as a unsigned 16-bit integer.
      Throws:
      IOException - if an I/O error occurs.
      EOFException - if this stream reaches the end before reading all the bytes.
    • readUint32

      public long readUint32() throws IOException, EOFException
      Reads the next four bytes of this input stream as a unsigned 32-bit integer.
      Returns:
      the long value as a unsigned 32-bit integer.
      Throws:
      IOException - if an I/O error occurs.
      EOFException - if this stream reaches the end before reading all the bytes.
    • readBytes

      public byte[] readBytes(int n) throws IOException, EOFException
      Throws:
      IOException
      EOFException
    • setCount

      public void setCount(int count)
    • getCount

      public int getCount()
    • close

      public void close()