org.apache.poi.hslf.util
Class MutableByteArrayOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.ByteArrayOutputStream
          extended byorg.apache.poi.hslf.util.MutableByteArrayOutputStream

public class MutableByteArrayOutputStream
extends java.io.ByteArrayOutputStream

This class doesn't work yet, but is here to show the idea of a ByteArrayOutputStream where you can track how many bytes you've already written, and go back and write over a previous part of the stream

Author:
Nick Burch

Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
MutableByteArrayOutputStream()
           
 
Method Summary
 int getBytesWritten()
          Return how many bytes we've stuffed in so far
 void overwrite(byte[] b, int startPos)
          Write some bytes to an earlier bit of the array
 void write(byte[] b)
          Write some bytes to the array
 void write(int b)
           
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableByteArrayOutputStream

public MutableByteArrayOutputStream()
Method Detail

getBytesWritten

public int getBytesWritten()
Return how many bytes we've stuffed in so far


write

public void write(byte[] b)
Write some bytes to the array


write

public void write(int b)

overwrite

public void overwrite(byte[] b,
                      int startPos)
Write some bytes to an earlier bit of the array



Copyright 2005 The Apache Software Foundation or its licensors, as applicable.