JXTA

net.jxta.document
Interface Document

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

public interface Document
extends DocumentStreamIO

A simple typed container for data. A Document is presented as a byte stream with an associated type. The data type is specified using a MIME Media Type (as defined by IETF RFC 2046 MIME : Media Types).

See Also:
MimeMediaType, StructuredDocument, StructuredDocumentFactory

Method Summary
 String getFileExtension()
          Returns the file extension type used by this Document.
 MimeMediaType getMimeType()
          Returns the MIME Media type of this Document per IETF RFC 2046 MIME : Media Types.
 
Methods inherited from interface net.jxta.document.DocumentStreamIO
getStream, sendToStream
 

Method Detail

getMimeType

MimeMediaType getMimeType()
Returns the MIME Media type of this Document per IETF RFC 2046 MIME : Media Types.

JXTA does not currently support the 'Multipart' or 'Message' media types.

Returns:
The MIME Media Type for this Document.

getFileExtension

String getFileExtension()
Returns the file extension type used by this Document. This value is usually chosen based upon the MIME Media Type.

Returns:
An appropriate file extension for this Document.

JXSE