Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache.kahadb.util » [javadoc | source]
org.apache.kahadb.util
public class: DataByteArrayOutputStream [javadoc | source]
java.lang.Object
   java.io.OutputStream
      org.apache.kahadb.util.DataByteArrayOutputStream

All Implemented Interfaces:
    DataOutput, Closeable, Flushable

Optimized ByteArrayOutputStream
Field Summary
protected  byte[] buf     
protected  int pos     
Constructor:
 public DataByteArrayOutputStream() 
 public DataByteArrayOutputStream(int size) 
Method from org.apache.kahadb.util.DataByteArrayOutputStream Summary:
getByteSequence,   getData,   onWrite,   position,   reset,   restart,   restart,   size,   skip,   toByteSequence,   write,   write,   writeBoolean,   writeByte,   writeBytes,   writeChar,   writeChars,   writeDouble,   writeFloat,   writeInt,   writeLong,   writeShort,   writeUTF
Methods from java.io.OutputStream:
close,   flush,   write,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.kahadb.util.DataByteArrayOutputStream Detail:
 public ByteSequence getByteSequence() 
 public byte[] getData() 
 protected  void onWrite() throws IOException 
    This method is called after each write to the buffer. This should allow subclasses to take some action based on the writes, for example flushing data to an external system based on size.
 public  void position(int offset) throws IOException 
    Set the current position for writing
 public  void reset() 
    reset the output stream
 public  void restart() 
    start using a fresh byte array
 public  void restart(int size) 
    start using a fresh byte array
 public int size() 
 public  void skip(int size) throws IOException 
 public ByteSequence toByteSequence() 
    Get a ByteSequence from the stream
 public  void write(int b) throws IOException 
    Writes the specified byte to this byte array output stream.
 public  void write(byte[] b,
    int off,
    int len) throws IOException 
    Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
 public  void writeBoolean(boolean v) throws IOException 
 public  void writeByte(int v) throws IOException 
 public  void writeBytes(String s) throws IOException 
 public  void writeChar(int v) throws IOException 
 public  void writeChars(String s) throws IOException 
 public  void writeDouble(double v) throws IOException 
 public  void writeFloat(float v) throws IOException 
 public  void writeInt(int v) throws IOException 
 public  void writeLong(long v) throws IOException 
 public  void writeShort(int v) throws IOException 
 public  void writeUTF(String str) throws IOException