ca.idms.io
Class LoDataInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by ca.idms.io.NativeDataInputStream
              extended by ca.idms.io.LoDataInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput

public class LoDataInputStream
extends NativeDataInputStream

LoDataInputStream reads numeric types in the low byte first ordering native to the Intel X86 architecture.

Since:
CA IDMS Server 4.2
Version:
2.00, 12/14/99
Author:
Dave Ross
See Also:
DataInput

Field Summary
 
Fields inherited from class ca.idms.io.NativeDataInputStream
dis, fmt
 
Fields inherited from class java.io.FilterInputStream
in
 
Method Summary
 char readChar()
          Reads a Unicode character as two bytes from the underlying input stream, low order byte first.
 int readInt()
          Reads a signed 32-bit integer from the underlying data input stream, low order byte first.
 long readLong()
          Reads a signed 64-bit integer from the underlying data input stream, low order byte first.
 short readShort()
          Reads a signed 16-bit number as two bytes from the underlying input stream, low order byte first.
 int readUnsignedShort()
          Reads an unsigned 16-bit number as two bytes from the underlying input stream, low order byte first.
 
Methods inherited from class ca.idms.io.NativeDataInputStream
getBuffer, getCount, getFormat, getPosition, readBoolean, readByte, readBytes, readBytesInternal, readBytesKatakana, readDouble, readFloat, readFully, readFully, readGraphic, readLine, readPacked, readUnsignedByte, readUTF, readZoned, setSize, skipBytes, snap, toBigDecimal
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readShort

public short readShort()
                throws java.io.IOException
Reads a signed 16-bit number as two bytes from the underlying input stream, low order byte first.

Specified by:
readShort in interface java.io.DataInput
Overrides:
readShort in class NativeDataInputStream
Returns:
the next two bytes of this input stream, interpreted as a signed 16-bit number.
Throws:
java.io.EOFException - if this input stream reaches the end before reading two bytes.
java.io.IOException - if an I/O error occurs.

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Reads an unsigned 16-bit number as two bytes from the underlying input stream, low order byte first.

Specified by:
readUnsignedShort in interface java.io.DataInput
Overrides:
readUnsignedShort in class NativeDataInputStream
Returns:
the next two bytes of this input stream, interpreted as an unsigned 16-bit number.
Throws:
java.io.EOFException - if this input stream reaches the end before reading two bytes.
java.io.IOException - if an I/O error occurs.

readChar

public char readChar()
              throws java.io.IOException
Reads a Unicode character as two bytes from the underlying input stream, low order byte first.

Specified by:
readChar in interface java.io.DataInput
Overrides:
readChar in class NativeDataInputStream
Returns:
the next two bytes of this input stream as a Unicode character.
Throws:
java.io.EOFException - if this input stream reaches the end before reading two bytes.
java.io.IOException - if an I/O error occurs.

readInt

public int readInt()
            throws java.io.IOException
Reads a signed 32-bit integer from the underlying data input stream, low order byte first.

Specified by:
readInt in interface java.io.DataInput
Overrides:
readInt in class NativeDataInputStream
Returns:
the next four bytes of this input stream, interpreted as an int.
Throws:
java.io.EOFException - if this input stream reaches the end before reading four bytes.
java.io.IOException - if an I/O error occurs.

readLong

public long readLong()
              throws java.io.IOException
Reads a signed 64-bit integer from the underlying data input stream, low order byte first.

Specified by:
readLong in interface java.io.DataInput
Overrides:
readLong in class NativeDataInputStream
Returns:
the next eight bytes of this input stream, interpreted as a long
Throws:
java.io.EOFException - if this input stream reaches the end before java.io.reading eight bytes.
java.io.IOException - if an I/O error occurs.


Copyright © 2009 CA, All rights reserved