Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::util::FastInputStream Class Reference

Inheritance diagram for com::sleepycat::util::FastInputStream:

com::sleepycat::bind::tuple::TupleInput

Public Member Functions

 FastInputStream (byte[] buffer)
 FastInputStream (byte[] buffer, int offset, int length)
final int readFast ()
final int readFast (byte[] toBuf)
final int readFast (byte[] toBuf, int offset, int length)
final byte[] getBufferBytes ()
final int getBufferOffset ()
final int getBufferLength ()

Detailed Description

A replacement for ByteArrayInputStream that does not synchronize every byte read.

This class extends InputStream and its read() methods allow it to be used as a standard input stream. In addition, it provides readFast() methods that are not declared to throw IOException. IOException is never thrown by this class.

Author:
Mark Hayes

Definition at line 27 of file FastInputStream.java.


Constructor & Destructor Documentation

com::sleepycat::util::FastInputStream::FastInputStream byte[]  buffer  )  [inline]
 

Creates an input stream.

Parameters:
buffer the data to read.

Definition at line 39 of file FastInputStream.java.

com::sleepycat::util::FastInputStream::FastInputStream byte[]  buffer,
int  offset,
int  length
[inline]
 

Creates an input stream.

Parameters:
buffer the data to read.
offset the byte offset at which to begin reading.
length the number of bytes to read.

Definition at line 54 of file FastInputStream.java.


Member Function Documentation

final byte [] com::sleepycat::util::FastInputStream::getBufferBytes  )  [inline]
 

Returns the underlying data being read.

Returns:
the underlying data.

Definition at line 154 of file FastInputStream.java.

Referenced by com::sleepycat::bind::tuple::TupleBase::inputToEntry(), and com::sleepycat::bind::tuple::TupleInput::readString().

final int com::sleepycat::util::FastInputStream::getBufferLength  )  [inline]
 

Returns the end of the buffer being read.

Returns:
the end of the buffer.

Definition at line 174 of file FastInputStream.java.

Referenced by com::sleepycat::bind::tuple::TupleBase::inputToEntry().

final int com::sleepycat::util::FastInputStream::getBufferOffset  )  [inline]
 

Returns the offset at which data is being read from the buffer.

Returns:
the offset at which data is being read.

Definition at line 164 of file FastInputStream.java.

Referenced by com::sleepycat::bind::tuple::TupleBase::inputToEntry(), and com::sleepycat::bind::tuple::TupleInput::readString().

final int com::sleepycat::util::FastInputStream::readFast byte[]  toBuf,
int  offset,
int  length
[inline]
 

Equivalent to read(byte[],int,int) but does not throw IOException.

See also:
#read(byte[],int,int)

Definition at line 135 of file FastInputStream.java.

final int com::sleepycat::util::FastInputStream::readFast byte[]  toBuf  )  [inline]
 

Equivalent to read(byte[]) but does not throw IOException.

See also:
#read(byte[])

Definition at line 125 of file FastInputStream.java.

References readFast().

final int com::sleepycat::util::FastInputStream::readFast  )  [inline]
 

Equivalent to read() but does not throw IOException.

See also:
#read()

Definition at line 115 of file FastInputStream.java.

Referenced by com::sleepycat::bind::tuple::TupleInput::readBoolean(), com::sleepycat::bind::tuple::TupleInput::readBytes(), readFast(), com::sleepycat::bind::tuple::TupleInput::readUnsignedByte(), com::sleepycat::bind::tuple::TupleInput::readUnsignedInt(), and com::sleepycat::bind::tuple::TupleInput::readUnsignedShort().


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:15:02 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2