Project JXTA

net.jxta.document
Interface TextDocument

All Superinterfaces:
Document
All Known Subinterfaces:
StructuredTextDocument, XMLDocument
All Known Implementing Classes:
StringMessageElement, TextDocumentMessageElement, TextMessageElement

public interface TextDocument
extends Document

Extends Document for text documents.

See Also:
Document

Method Summary
 Reader getReader()
          Returns the sequence of characters which represents the content of this TextDocument.
 void sendToWriter(Writer stream)
          Send the contents of this TextDocument to the specified Writer.
 String toString()
          Returns a String representation of this TextDocument.
 
Methods inherited from interface net.jxta.document.Document
getFileExtension, getMimeType, getStream, sendToStream
 

Method Detail

getReader

Reader getReader()
                 throws IOException
Returns the sequence of characters which represents the content of this TextDocument.

Returns:
An Reader containing the characters of this TextDocument.
Throws:
IOException - if an I/O error occurs.

sendToWriter

void sendToWriter(Writer stream)
                  throws IOException
Send the contents of this TextDocument to the specified Writer.

Parameters:
stream - The OutputStream to which the Document will be written.
Throws:
IOException - if an I/O error occurs.

toString

String toString()
Returns a String representation of this TextDocument.

Overrides:
toString in class Object

JXTA J2SE