public class TextHandler extends Object implements javax.activation.DataContentHandler
Constructor and Description |
---|
TextHandler() |
TextHandler(javax.activation.ActivationDataFlavor dataFlavor)
Constructor TextHandler
|
Modifier and Type | Method and Description |
---|---|
protected String |
getCharSet(String contentType)
get the character set from content type
|
Object |
getContent(javax.activation.DataSource datasource)
Method getContent
|
protected javax.activation.ActivationDataFlavor |
getDF()
Method getDF
|
Object |
getTransferData(DataFlavor dataflavor,
javax.activation.DataSource datasource)
Method getTransferData
|
DataFlavor[] |
getTransferDataFlavors()
Method getTransferDataFlavors
|
void |
writeTo(Object object,
String contentType,
OutputStream outputstream)
Write an object of "our" type out to the provided
output stream.
|
public TextHandler()
public TextHandler(javax.activation.ActivationDataFlavor dataFlavor)
dataFlavor
- protected javax.activation.ActivationDataFlavor getDF()
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface javax.activation.DataContentHandler
public Object getTransferData(DataFlavor dataflavor, javax.activation.DataSource datasource) throws IOException
getTransferData
in interface javax.activation.DataContentHandler
dataflavor
- datasource
- IOException
public Object getContent(javax.activation.DataSource datasource) throws IOException
getContent
in interface javax.activation.DataContentHandler
datasource
- IOException
public void writeTo(Object object, String contentType, OutputStream outputstream) throws IOException
writeTo
in interface javax.activation.DataContentHandler
object
- The object to write.contentType
- The content mime type, including parameters.outputstream
- The target output stream.IOException
protected String getCharSet(String contentType) throws ParseException
contentType
- ParseException
Copyright © 2013. All rights reserved.