org.apache.pivot.wtk.text
Class PlainTextSerializer
java.lang.Object
org.apache.pivot.wtk.text.PlainTextSerializer
- All Implemented Interfaces:
- org.apache.pivot.serialization.Serializer<Document>
public class PlainTextSerializer
- extends Object
- implements org.apache.pivot.serialization.Serializer<Document>
Implementation of the Serializer interface that reads and writes
a plain text document.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIME_TYPE
public static final String MIME_TYPE
- See Also:
- Constant Field Values
BUFFER_SIZE
public static final int BUFFER_SIZE
- See Also:
- Constant Field Values
PlainTextSerializer
public PlainTextSerializer()
PlainTextSerializer
public PlainTextSerializer(String charsetName)
PlainTextSerializer
public PlainTextSerializer(Charset charset)
readObject
public Document readObject(InputStream inputStream)
throws IOException
- Specified by:
readObject in interface org.apache.pivot.serialization.Serializer<Document>
- Throws:
IOException
readObject
public Document readObject(Reader reader)
throws IOException
- Throws:
IOException
writeObject
public void writeObject(Document document,
OutputStream outputStream)
throws IOException
- Specified by:
writeObject in interface org.apache.pivot.serialization.Serializer<Document>
- Throws:
IOException
writeObject
public void writeObject(Document document,
Writer writer)
throws IOException
- Throws:
IOException
getMIMEType
public String getMIMEType(Document document)
- Specified by:
getMIMEType in interface org.apache.pivot.serialization.Serializer<Document>