org.hsqldb.lib
Class HsqlByteArrayInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.hsqldb.lib.HsqlByteArrayInputStream
All Implemented Interfaces:
DataInput
Direct Known Subclasses:
RowInputBase

public class HsqlByteArrayInputStream
extends InputStream
implements DataInput

This class is a replacement for both java.io.ByteArrayInputStream (without synchronization) and java.io.DataInputStream

Since:
1.7.2
Version:
1.7.2
Author:
fredt@users

Field Summary
protected  byte[] buf
           
protected  int count
           
protected  int mark
           
protected  int pos
           
 
Constructor Summary
HsqlByteArrayInputStream(byte[] buf)
           
HsqlByteArrayInputStream(byte[] buf, int offset, int length)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
           
 String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
 void reset()
           
 long skip(long n)
           
 int skipBytes(int n)
           
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected byte[] buf

pos

protected int pos

mark

protected int mark

count

protected int count
Constructor Detail

HsqlByteArrayInputStream

public HsqlByteArrayInputStream(byte[] buf)

HsqlByteArrayInputStream

public HsqlByteArrayInputStream(byte[] buf,
                                int offset,
                                int length)
Method Detail

readFully

public final void readFully(byte[] b)
                     throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

readFully

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

readBoolean

public final boolean readBoolean()
                          throws IOException
Specified by:
readBoolean in interface DataInput
Throws:
IOException

readByte

public final byte readByte()
                    throws IOException
Specified by:
readByte in interface DataInput
Throws:
IOException

readUnsignedByte

public final int readUnsignedByte()
                           throws IOException
Specified by:
readUnsignedByte in interface DataInput
Throws:
IOException

readShort

public final short readShort()
                      throws IOException
Specified by:
readShort in interface DataInput
Throws:
IOException

readUnsignedShort

public final int readUnsignedShort()
                            throws IOException
Specified by:
readUnsignedShort in interface DataInput
Throws:
IOException

readChar

public final char readChar()
                    throws IOException
Specified by:
readChar in interface DataInput
Throws:
IOException

readInt

public final int readInt()
                  throws IOException
Specified by:
readInt in interface DataInput
Throws:
IOException

readLong

public final long readLong()
                    throws IOException
Specified by:
readLong in interface DataInput
Throws:
IOException

readFloat

public final float readFloat()
                      throws IOException
Specified by:
readFloat in interface DataInput
Throws:
IOException

readDouble

public final double readDouble()
                        throws IOException
Specified by:
readDouble in interface DataInput
Throws:
IOException

skipBytes

public int skipBytes(int n)
              throws IOException
Specified by:
skipBytes in interface DataInput
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface DataInput
Throws:
IOException

readUTF

public String readUTF()
               throws IOException
Specified by:
readUTF in interface DataInput
Throws:
IOException

read

public int read()

read

public int read(byte[] b,
                int off,
                int len)

skip

public long skip(long n)

available

public int available()

markSupported

public boolean markSupported()

mark

public void mark(int readAheadLimit)

reset

public void reset()

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.