|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.io.SharedOutputStream
public class SharedOutputStream
Output stream that can share its stream data with a number of writers.
Use this class when you want multiple people writing to the same output stream, and have the output in a specific order, but you cannot control the order that they write in. For example, in a MIME Stream, you can have multiple parts, which appear in a specific order, but the user can write to the individual parts in any particular order.
Constructor Summary | ||
---|---|---|
SharedOutputStream(OutputStream out)
Build a shared output stream on provided output stream. |
Method Summary | ||
---|---|---|
void |
close()
Closes this output stream and releases any system resources it uses. |
|
OutputStream |
getOutputStream()
Retrieves a new output stream that can write to this shared stream. |
|
void |
writeSeparator()
Invoked after an output stream is closed and before the next one begins to write to the shared stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SharedOutputStream(OutputStream out)
out
- Output stream to use as underlying data buffer for this stream.Method Detail |
---|
public OutputStream getOutputStream()
public void close() throws IOException
A closed stream cannot perform output operations, and it cannot be re-opened.
IOException
- If an I/O error occurs.public void writeSeparator() throws IOException
IOException
- If an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal