|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OutputBufferStream
Appends data to the BufferStream.
| Method Summary | |
|---|---|
void |
append(BufferSquirt squirt)
Appends the BufferSquirt to the BufferStream. |
void |
append(ByteBuffer buffer)
Appends the ByteBuffer to the BufferStream. |
void |
close()
Closes the stream releasing resources. |
OutputStream |
getOutputStream()
Obtains an OutputStream that writes content to the
BufferStream. |
void |
write(BufferPopulator populator)
Writes content to a ByteBuffer of the BufferStream. |
void |
write(byte[] bytes)
Writes the bytes to the BufferStream. |
void |
write(byte[] data,
int offset,
int length)
Writes the bytes to the BufferStream. |
| Method Detail |
|---|
OutputStream getOutputStream()
Obtains an OutputStream that writes content to the
BufferStream.
This allows use of existing stream implementations.
OutputStream.
void write(byte[] bytes)
throws IOException
Writes the bytes to the BufferStream.
The bytes are copied into the BufferStream so that the input
array is no longer required.
bytes - Bytes to be written to the BufferStream.
IOException - If fails to write the bytes.
void write(byte[] data,
int offset,
int length)
throws IOException
Writes the bytes to the BufferStream.
The bytes are copied into the BufferStream so that the input
array is no longer required.
data - Bytes to be written to the BufferStream.offset - Offset into the data to start obtaining bytes to write.length - Number of bytes to write from the data.
IOException - If fails to write the bytes.
void write(BufferPopulator populator)
throws IOException
ByteBuffer of the BufferStream.
populator - BufferPopulator to write data to the
ByteBuffer.
IOException - If fails to write data to ByteBuffer.
void append(ByteBuffer buffer)
throws IOException
Appends the ByteBuffer to the BufferStream.
The ByteBuffer is used directly by the BufferStream and
must not be changed until the BufferStream is no longer being
used. This should only be used when the ByteBuffer never changes
(contains static information).
Use append(BufferSquirt) over this method to know when the
ByteBuffer can be modified again.
buffer - ByteBuffer ready to be read from.
IOException - If fails to append to the BufferStream.
void append(BufferSquirt squirt)
throws IOException
Appends the BufferSquirt to the BufferStream.
BufferSquirt.close() is invoked when the BufferStream no
longer requires the BufferSquirt.
squirt - BufferSquirt to append to the BufferStream.
IOException - If fails to append to the BufferStream.
void close()
throws IOException
IOException - If fails to close the BufferStream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||