|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
things.common.tools.TightByteArrayOutputStream
public class TightByteArrayOutputStream
A cousin to the ByteArrayOutputStream. Instead of just expanding it forever, throw an IOException.
Version History
EPG - Initial - 20 JUL 06
Field Summary |
---|
Fields inherited from class java.io.ByteArrayOutputStream |
---|
buf, count |
Constructor Summary | |
---|---|
TightByteArrayOutputStream()
Construct. |
Method Summary | |
---|---|
void |
copyMarkTo(java.io.OutputStream ous)
Copy from the last mark (or start if not mark made) to the end of the buffer into a stream. |
byte[] |
get()
Get the total buffer. |
int |
getFillSize()
Get how much of the buffer is filled. |
int |
mark()
Mark the next spot that will get a byte and return the value. |
Methods inherited from class java.io.ByteArrayOutputStream |
---|
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
---|
flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TightByteArrayOutputStream() throws java.lang.Throwable
java.lang.Throwable
- if the data is not allowed.Method Detail |
---|
public byte[] get()
public int getFillSize()
public int mark()
public void copyMarkTo(java.io.OutputStream ous) throws java.io.IOException
ous
- the output stream.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |