|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.OutputStream
org.jppf.utils.streams.MultipleBuffersOutputStream
public class MultipleBuffersOutputStream
An output stream implementation that minimizes memory usage.
| Constructor Summary | |
|---|---|
MultipleBuffersOutputStream()
Intialize this output stream with a default buffer length of 32768. |
|
MultipleBuffersOutputStream(int defaultLength)
Intialize this output stream with the specified default buffer length. |
|
MultipleBuffersOutputStream(List<JPPFBuffer> initialList)
Intialize this output stream with a default buffer length of 32768. |
|
| Method Summary | |
|---|---|
int |
size()
Get the size of the content of this output stream. |
List<JPPFBuffer> |
toBufferList()
Get the content of the output stream as a list of JPPFBuffer instances. |
byte[] |
toByteArray()
Get te content of the output stream as a single array of byte |
String |
toString()
|
void |
write(byte[] b)
Writes the specified byte array to this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this output stream. |
void |
write(int b)
Write a single byte into this output stream. |
| Methods inherited from class java.io.OutputStream |
|---|
close, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultipleBuffersOutputStream()
public MultipleBuffersOutputStream(List<JPPFBuffer> initialList)
initialList - contains the data that is written to this output stream.
public MultipleBuffersOutputStream(int defaultLength)
throws IllegalArgumentException
defaultLength - the default buffer length to use, must be strictly greater than 0.
IllegalArgumentException - if the specified default length is less than 1.| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamb - the data to write.
IOException - if any error occurs.OutputStream.write(int)
public void write(byte[] b,
int off,
int len)
throws IOException
len bytes from the specified byte array starting at offset off to this output stream.
write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
IOException - if any error occurs.OutputStream.write(byte[], int, int)
public void write(byte[] b)
throws IOException
write in class OutputStreamb - the data to write.
IOException - if any error occurs.OutputStream.write(byte[])public int size()
public List<JPPFBuffer> toBufferList()
JPPFBuffer instances.
JPPFBuffer instances.public byte[] toByteArray()
public String toString()
toString in class Object
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||