Package org.apache.poi.hslf.util
Class MutableByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.apache.poi.hslf.util.MutableByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public final class MutableByteArrayOutputStream extends 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
-
-
Constructor Summary
Constructors Constructor Description MutableByteArrayOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBytesWritten()
Return how many bytes we've stuffed in so farvoid
overwrite(byte[] b, int startPos)
Write some bytes to an earlier bit of the arrayvoid
write(byte[] b)
Write some bytes to the arrayvoid
write(int b)
-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
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- Overrides:
write
in classOutputStream
-
write
public void write(int b)
- Overrides:
write
in classByteArrayOutputStream
-
overwrite
public void overwrite(byte[] b, int startPos)
Write some bytes to an earlier bit of the array
-
-