|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
org.cip4.jdflib.util.ByteArrayIOStream
public class ByteArrayIOStream
Shared input / outputStream class write once, read many...
| Nested Class Summary | |
|---|---|
static class |
ByteArrayIOStream.ByteArrayIOInputStream
bytearrayinputstream that allows duplication without copying |
| Field Summary |
|---|
| Fields inherited from class java.io.ByteArrayOutputStream |
|---|
buf, count |
| Constructor Summary | |
|---|---|
ByteArrayIOStream()
creates an empty input output stream class |
|
ByteArrayIOStream(byte[] b)
creates a sized input output stream class |
|
ByteArrayIOStream(File f)
create a ByteArrayIOStream from a file |
|
ByteArrayIOStream(InputStream is)
creates an input output stream class from any stream if is alraedy is a buffered inputstream, no copy is made |
|
ByteArrayIOStream(int i)
creates a sized input output stream class |
|
| Method Summary | |
|---|---|
byte[] |
getBuf()
get the internal buffer - be careful, this is THE buffer |
static ByteArrayIOStream.ByteArrayIOInputStream |
getBufferedInputStream(InputStream is)
get a completely buffered and resizable input stream |
ByteArrayIOStream.ByteArrayIOInputStream |
getInputStream()
gets an input stream based on the current byte contents - note this operates on the internal data |
String |
toString()
|
| Methods inherited from class java.io.ByteArrayOutputStream |
|---|
close, reset, size, toByteArray, 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 ByteArrayIOStream()
public ByteArrayIOStream(int i)
i - the size of the streampublic ByteArrayIOStream(InputStream is)
is - the inputstream to buffer
public ByteArrayIOStream(File f)
throws IOException
f - the file
IOExceptionpublic ByteArrayIOStream(byte[] b)
b - the buffer to use (is NOT copied)| Method Detail |
|---|
public static ByteArrayIOStream.ByteArrayIOInputStream getBufferedInputStream(InputStream is)
is -
public ByteArrayIOStream.ByteArrayIOInputStream getInputStream()
public byte[] getBuf()
public String toString()
toString in class ByteArrayOutputStreamByteArrayOutputStream.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||