Class RFC822ToTextConverter
- java.lang.Object
-
- org.nuxeo.ecm.core.convert.plugins.text.extractors.RFC822ToTextConverter
-
- All Implemented Interfaces:
Converter
public class RFC822ToTextConverter extends Object implements Converter
-
-
Field Summary
Fields Modifier and Type Field Description protected ConverterDescriptor
descriptor
-
Constructor Summary
Constructors Constructor Description RFC822ToTextConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobHolder
convert(BlobHolder blobHolder, Map<String,Serializable> parameters)
Main method to handle the real Conversion Job.protected Blob
extractTextFromMessage(Blob blob)
protected static byte[]
extractTextFromMessagePart(javax.mail.Part p)
protected static List<javax.mail.Part>
getAttachmentParts(javax.mail.Part p)
void
init(ConverterDescriptor descriptor)
Initializes the Converter.protected static void
writeInfo(OutputStream stream, byte[] info)
protected static void
writeInfo(OutputStream stream, String info)
protected static void
writeInfo(OutputStream stream, javax.mail.Address address)
protected static void
writeInfo(OutputStream stream, javax.mail.Address[] addresses)
-
-
-
Field Detail
-
descriptor
protected ConverterDescriptor descriptor
-
-
Constructor Detail
-
RFC822ToTextConverter
public RFC822ToTextConverter()
-
-
Method Detail
-
extractTextFromMessage
protected Blob extractTextFromMessage(Blob blob)
-
writeInfo
protected static void writeInfo(OutputStream stream, javax.mail.Address address)
-
writeInfo
protected static void writeInfo(OutputStream stream, javax.mail.Address[] addresses)
-
writeInfo
protected static void writeInfo(OutputStream stream, String info)
-
writeInfo
protected static void writeInfo(OutputStream stream, byte[] info)
-
extractTextFromMessagePart
protected static byte[] extractTextFromMessagePart(javax.mail.Part p) throws javax.mail.MessagingException, IOException
- Throws:
javax.mail.MessagingException
IOException
-
getAttachmentParts
protected static List<javax.mail.Part> getAttachmentParts(javax.mail.Part p) throws javax.mail.MessagingException, IOException
- Throws:
javax.mail.MessagingException
IOException
-
convert
public BlobHolder convert(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Description copied from interface:Converter
Main method to handle the real Conversion Job.Returned
BlobHolder
must implementCachableBlobHolder
, otherwise result won't be cached.- Specified by:
convert
in interfaceConverter
- Throws:
ConversionException
-
init
public void init(ConverterDescriptor descriptor)
Description copied from interface:Converter
Initializes the Converter.This can be used to retrieve some configuration information from the XMap Descriptor.
-
-