JXTA

net.jxta.document
Interface DocumentStreamIO

All Known Subinterfaces:
Document, StructuredDocument<E>, StructuredTextDocument<T>, TextDocument, WireFormatMessage, XMLDocument<X>
All Known Implementing Classes:
BinaryDocument, ByteArrayMessageElement, FileDocument, InputStreamMessageElement, MessageElement, StringMessageElement, TextDocumentMessageElement, TextMessageElement

public interface DocumentStreamIO

Provides stream based interfaces for manipulating Document contents.

See Also:
Document

Method Summary
 InputStream getStream()
          Returns the stream of bytes which represents the content of this Document.
 void sendToStream(OutputStream stream)
          Send the contents of this Document to the specified stream.
 

Method Detail

getStream

InputStream getStream()
                      throws IOException
Returns the stream of bytes which represents the content of this Document.

Returns:
An InputStream containing the bytes of this Document.
Throws:
IOException - For errors while writing the Document.

sendToStream

void sendToStream(OutputStream stream)
                  throws IOException
Send the contents of this Document to the specified stream.

Parameters:
stream - The OutputStream to which the Document will be written.
Throws:
IOException - For errors while writing the Document.

JXSE