| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
org.freehep.util.io.DecompressableInputStream
org.freehep.util.io.BitInputStream
org.freehep.util.io.ByteOrderInputStream
public class ByteOrderInputStream
Class to read bytes and pairs of bytes in both little and big endian order.
| Field Summary | |
|---|---|
protected  boolean | 
little
 | 
| Fields inherited from class org.freehep.util.io.BitInputStream | 
|---|
BIT_MASK, FIELD_MASK, MASK_SIZE, ONES, ZERO | 
| Constructor Summary | |
|---|---|
ByteOrderInputStream(InputStream in)
Create a byte order (big-endian) input stream from given stream.  | 
|
ByteOrderInputStream(InputStream in,
                     boolean littleEndian)
Create a byte order input stream from given stream.  | 
|
| Method Summary | |
|---|---|
 String | 
readAsciiZString()
Read an ascii-z (0 terminated c-string).  | 
 boolean | 
readBoolean()
 | 
 byte | 
readByte()
Read a signed byte.  | 
 byte[] | 
readByte(int n)
Read n bytes and return in byte array.  | 
 char | 
readChar()
 | 
 double | 
readDouble()
 | 
 float | 
readFloat()
 | 
 void | 
readFully(byte[] b)
 | 
 void | 
readFully(byte[] b,
          int off,
          int len)
 | 
 int | 
readInt()
Read a signed integer.  | 
 int[] | 
readInt(int n)
Read n ints and return in int array.  | 
 String | 
readLine()
Deprecated.  | 
 long | 
readLong()
 | 
 short | 
readShort()
Read a signed short.  | 
 short[] | 
readShort(int n)
Read n shorts and return in short array  | 
 String | 
readString()
Read a string (UTF).  | 
 int | 
readUnsignedByte()
Read an unsigned byte.  | 
 int[] | 
readUnsignedByte(int n)
Read n unsigned bytes and return in int array.  | 
 long | 
readUnsignedInt()
Read an unsigned integer.  | 
 long[] | 
readUnsignedInt(int n)
Read n unsigned ints and return in long array.  | 
 int | 
readUnsignedShort()
Read an unsigned short.  | 
 int[] | 
readUnsignedShort(int n)
Read n unsigned shorts and return in int array  | 
 String | 
readUTF()
 | 
 int | 
skipBytes(int n)
 | 
| Methods inherited from class org.freehep.util.io.BitInputStream | 
|---|
byteAlign, fetchByte, readBitFlag, readFBits, readSBits, readUBits | 
| Methods inherited from class org.freehep.util.io.DecompressableInputStream | 
|---|
read, skip, startDecompressing | 
| Methods inherited from class java.io.InputStream | 
|---|
available, close, mark, markSupported, read, read, reset | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean little
| Constructor Detail | 
|---|
public ByteOrderInputStream(InputStream in)
in - stream to read from
public ByteOrderInputStream(InputStream in,
                            boolean littleEndian)
in - stream to read fromlittleEndian - true if stream should be little endian.| Method Detail | 
|---|
public void readFully(byte[] b)
               throws IOException
readFully in interface DataInputIOException
public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
readFully in interface DataInputIOException
public int skipBytes(int n)
              throws IOException
skipBytes in interface DataInputIOException
public boolean readBoolean()
                    throws IOException
readBoolean in interface DataInputIOException
public char readChar()
              throws IOException
readChar in interface DataInputIOException
public byte readByte()
              throws IOException
readByte in interface DataInputIOException
public byte[] readByte(int n)
                throws IOException
n - number of bytes to read
IOException - if read fails
public int readUnsignedByte()
                     throws IOException
readUnsignedByte in interface DataInputIOException
public int[] readUnsignedByte(int n)
                       throws IOException
n - number of bytes to read
IOException - if read fails
public short readShort()
                throws IOException
readShort in interface DataInputIOException
public short[] readShort(int n)
                  throws IOException
n - number of shorts to read
IOException - if read fails
public int readUnsignedShort()
                      throws IOException
readUnsignedShort in interface DataInputIOException
public int[] readUnsignedShort(int n)
                        throws IOException
n - number of shorts to read
IOException - if read fails
public int readInt()
            throws IOException
readInt in interface DataInputIOException
public int[] readInt(int n)
              throws IOException
n - number of ints to read
IOException - if read fails
public long readUnsignedInt()
                     throws IOException
IOException - if read fails
public long[] readUnsignedInt(int n)
                       throws IOException
n - number of ints to read
IOException - if read fails
public long readLong()
              throws IOException
readLong in interface DataInputIOException
public float readFloat()
                throws IOException
readFloat in interface DataInputIOException
public double readDouble()
                  throws IOException
readDouble in interface DataInputIOException
public String readLine()
                throws IOException
readLine in interface DataInputIOException
public String readString()
                  throws IOException
IOException - if read fails
public String readUTF()
               throws IOException
readUTF in interface DataInputIOException
public String readAsciiZString()
                        throws IOException
IOException - if read fails
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||