ostore.util
Class InputBufferImpl

java.lang.Object
  |
  +--ostore.util.InputBufferImpl
All Implemented Interfaces:
Cloneable, InputBuffer
Direct Known Subclasses:
ByteArrayInputBuffer, FromBytesInputBuffer, NetworkInputBuffer, RandomAccessFileInputBuffer, StreamInputBuffer

public abstract class InputBufferImpl
extends Object
implements InputBuffer

Implements all of the functionality of InputBuffer except nextByte and nextBytes. A subclass can inherit from this class to implement an InputBuffer interface while only having to define nextByte and nextBytes.

Version:
$Id: InputBufferImpl.java,v 1.10 2003/09/03 22:12:07 srhea Exp $
Author:
Sean C. Rhea

Constructor Summary
InputBufferImpl()
           
 
Method Summary
 Object clone()
          Buffers must support clone such that the read pointer on a cloned buffer is independent of the original.
 BigInteger nextBigInteger()
          Read the next BigInteger out of the buffer.
static BigInteger nextBigInteger(InputBuffer buffer)
          Read the next BigInteger out of the buffer.
 boolean nextBoolean()
          Read the next boolean out of the buffer.
static boolean nextBoolean(InputBuffer buffer)
          Read the next boolean out of the buffer.
 double nextDouble()
          Read the next double out of the buffer.
static double nextDouble(InputBuffer buffer)
          Read the next double out of the buffer.
 int nextInt()
          Read the next integer out of the buffer.
static int nextInt(InputBuffer buffer)
          Read the next integer out of the buffer.
 long nextLong()
          Read the next long out of the buffer.
static long nextLong(InputBuffer buffer)
          Read the next long out of the buffer.
 QuickSerializable nextObject()
          Read the next object out of the buffer.
static QuickSerializable nextObject(InputBuffer buffer)
          Read the next object out of the buffer.
 short nextShort()
          Read the next short out of the buffer.
static short nextShort(InputBuffer buffer)
          Read the next integer out of the buffer.
 String nextString()
          Read the next String out of the buffer.
static String nextString(InputBuffer buffer)
          Read the next String out of the buffer.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ostore.util.InputBuffer
nextByte, nextBytes, nextBytes, subBuffer
 

Constructor Detail

InputBufferImpl

public InputBufferImpl()
Method Detail

nextShort

public short nextShort()
Read the next short out of the buffer.

Specified by:
nextShort in interface InputBuffer

nextInt

public int nextInt()
Read the next integer out of the buffer.

Specified by:
nextInt in interface InputBuffer

nextLong

public long nextLong()
Read the next long out of the buffer.

Specified by:
nextLong in interface InputBuffer

nextDouble

public double nextDouble()
Read the next double out of the buffer.

Specified by:
nextDouble in interface InputBuffer

nextBoolean

public boolean nextBoolean()
Read the next boolean out of the buffer.

Specified by:
nextBoolean in interface InputBuffer

nextString

public String nextString()
Read the next String out of the buffer.

Specified by:
nextString in interface InputBuffer

nextBigInteger

public BigInteger nextBigInteger()
                          throws QSException
Read the next BigInteger out of the buffer.

Specified by:
nextBigInteger in interface InputBuffer
QSException

nextObject

public QuickSerializable nextObject()
                             throws QSException
Read the next object out of the buffer.

Specified by:
nextObject in interface InputBuffer
QSException

nextShort

public static final short nextShort(InputBuffer buffer)
Read the next integer out of the buffer.


nextInt

public static final int nextInt(InputBuffer buffer)
Read the next integer out of the buffer.


nextLong

public static final long nextLong(InputBuffer buffer)
Read the next long out of the buffer.


nextDouble

public static final double nextDouble(InputBuffer buffer)
Read the next double out of the buffer.


nextBoolean

public static final boolean nextBoolean(InputBuffer buffer)
Read the next boolean out of the buffer.


nextString

public static final String nextString(InputBuffer buffer)
Read the next String out of the buffer.


nextBigInteger

public static final BigInteger nextBigInteger(InputBuffer buffer)
                                       throws QSException
Read the next BigInteger out of the buffer.

QSException

nextObject

public static final QuickSerializable nextObject(InputBuffer buffer)
                                          throws QSException
Read the next object out of the buffer.

QSException

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: InputBuffer
Buffers must support clone such that the read pointer on a cloned buffer is independent of the original. This functionality is used in Tapestry and will be used in SignedQS as well, I think. It relates to the need to deserialize a buffer twice. Whether or not we keep using it is subject to change.

Specified by:
clone in interface InputBuffer
Overrides:
clone in class Object
CloneNotSupportedException