public final class BufferOutputStream
extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
(package private) byte[] |
buffer |
(package private) int |
limit |
(package private) int |
offset |
(package private) int |
pos |
| Constructor and Description |
|---|
BufferOutputStream(Buffer data) |
BufferOutputStream(byte[] buffer) |
BufferOutputStream(int size) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkCapacity(int minimumCapacity)
Ensures the the buffer has at least the minimumCapacity specified.
|
Buffer |
getNextBuffer(int len) |
void |
reset() |
int |
size() |
Buffer |
toBuffer() |
byte[] |
toByteArray() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public BufferOutputStream(int size)
public BufferOutputStream(byte[] buffer)
public BufferOutputStream(Buffer data)
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic Buffer getNextBuffer(int len) throws java.io.IOException
java.io.IOExceptionprivate void checkCapacity(int minimumCapacity)
throws java.io.IOException
i - java.io.EOFExceptionjava.io.IOExceptionpublic void reset()
public Buffer toBuffer()
public byte[] toByteArray()
public int size()