ostore.util
Class ByteArrayOutputBuffer

java.lang.Object
  |
  +--ostore.util.OutputBufferImpl
        |
        +--ostore.util.ByteArrayOutputBuffer
All Implemented Interfaces:
OutputBuffer
Direct Known Subclasses:
ArchiveByteArrayOutputBuffer

public class ByteArrayOutputBuffer
extends OutputBufferImpl

Writes objects into a user-provided byte array.

Version:
$Id: ByteArrayOutputBuffer.java,v 1.4 2003/05/28 05:45:33 srhea Exp $
Author:
Sean C. Rhea

Constructor Summary
ByteArrayOutputBuffer(byte[] data)
           
ByteArrayOutputBuffer(byte[] data, int offset, int length)
           
 
Method Summary
 void add(byte input)
          Adds the specified byte to the digest.
 void add(byte[] value, int offset, int length)
          Adds length bytes of the specified array to the digest, starting at offset.
 byte[] data()
           
 int offset()
           
 void reset(byte[] data)
           
 int size()
           
 
Methods inherited from class ostore.util.OutputBufferImpl
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayOutputBuffer

public ByteArrayOutputBuffer(byte[] data)

ByteArrayOutputBuffer

public ByteArrayOutputBuffer(byte[] data,
                             int offset,
                             int length)
Method Detail

offset

public int offset()

data

public byte[] data()

add

public void add(byte input)
Description copied from class: OutputBufferImpl
Adds the specified byte to the digest.

Specified by:
add in interface OutputBuffer
Specified by:
add in class OutputBufferImpl

add

public void add(byte[] value,
                int offset,
                int length)
Description copied from class: OutputBufferImpl
Adds length bytes of the specified array to the digest, starting at offset.

Specified by:
add in interface OutputBuffer
Specified by:
add in class OutputBufferImpl

reset

public void reset(byte[] data)

size

public int size()