|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectOutputStream
ByteArrayOutputStream
MaxByteArrayOutputStream
public class MaxByteArrayOutputStream
An output stream that will only accept the first N bytes of data.
| Field Summary |
|---|
| Fields inherited from class ByteArrayOutputStream |
|---|
buf, count |
| Constructor Summary | |
|---|---|
MaxByteArrayOutputStream(int maxBytes)
Create. |
|
| Method Summary | |
|---|---|
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this byte array output stream. |
void |
write(int b)
Writes the specified byte to this byte array output stream. |
| Methods inherited from class ByteArrayOutputStream |
|---|
close, reset, size, toByteArray, toString, toString, toString, writeTo |
| Methods inherited from class OutputStream |
|---|
flush, write |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MaxByteArrayOutputStream(int maxBytes)
| Method Detail |
|---|
public void write(int b)
write in class ByteArrayOutputStreamb - the byte to be written.
public void write(byte[] b,
int off,
int len)
len bytes from the specified byte array
starting at offset off to this byte array output stream.
Any bytes after the first maxBytes will be ignored.
write in class ByteArrayOutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||