Project JXTA

net.jxta.document
Interface TextDocument

All Known Subinterfaces:
StructuredTextDocument

public interface TextDocument
extends Document

This interface represents a Text based Document.

Since:
JXTA 1.0
See Also:
Document, TextElement, StructuredTextDocument, StructuredDocumentFactory, MimeMediaType, StructuredDocument

Method Summary
 java.io.Reader getReader()
          Returns a stream of characters which represent the content of this Document.
 void sendToWriter(java.io.Writer stream)
          Rather than returning an InputStream, send the document to the specified stream.
 
Methods inherited from interface net.jxta.document.Document
getMimeType, getStream, sendToStream
 

Method Detail

getReader

public java.io.Reader getReader()
                         throws java.io.IOException
Returns a stream of characters which represent the content of this Document.
Returns:
Reader A Reader containting the characters of this Document.
Since:
JXTA 1.0

sendToWriter

public void sendToWriter(java.io.Writer stream)
                  throws java.io.IOException
Rather than returning an InputStream, send the document to the specified stream.
Parameters:
stream - The OutputStream to which the document will be written.
Throws:
java.io.IOException - if an I/O error occurs.
Since:
JXTA 1.0

Project JXTA