public class LazyMimeDescriptor extends Object implements MimeDescriptor
MimeDescriptor implementation which tries to optimize the way the data
is loading by using it in a lazy fashion whenever possible.| Constructor and Description |
|---|
LazyMimeDescriptor(MessageResult result,
Message<?> message) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
contentTypeParameters()
Gets MIME body parameters parsed from
Content-Type. |
MimeDescriptor |
embeddedMessage()
Return null
|
long |
getBodyOctets()
The number of octets contained in the body of this part.
|
String |
getContentDescription()
Gets MIME
Content-Description header value. |
String |
getContentID()
Gets the MIME
Content-ID header value. |
String |
getContentLocation()
Gets MIME
Content-Location header value. |
String |
getContentMD5()
Gets MIME
Content-MD5 header value. |
String |
getDisposition()
Gets MIME
Content-Disposition. |
Map<String,String> |
getDispositionParams()
Gets MIME
Content-Disposition parameters. |
InputStream |
getInputStream()
Return the content as
InputStream |
List<String> |
getLanguages()
Gets the languages, From the MIME
Content-Language header
value. |
long |
getLines()
Gets the number of lines of text in a part of type
TEXT when
transfer encoded. |
String |
getMimeSubType()
Gets the MIME content subtype.
|
String |
getMimeType()
Gets the top level MIME content media type.
|
String |
getTransferContentEncoding()
Gets the MIME content transfer encoding.
|
Iterator<MessageResult.Header> |
headers()
Gets headers for the message.
|
Iterator<MimeDescriptor> |
parts()
Gets parts.
|
long |
size()
Size (in octets) of the content.
|
public LazyMimeDescriptor(MessageResult result, Message<?> message)
public Iterator<MessageResult.Header> headers() throws MailboxException
Headersheaders in interface HeadersHeader Iterator, or null if
MessageResult.FetchGroup.HEADERS was not fetchedMailboxExceptionpublic InputStream getInputStream() throws IOException
ContentInputStreamgetInputStream in interface ContentIOExceptionpublic long size()
throws MailboxException
Contentsize in interface ContentMailboxExceptionpublic String getMimeType()
MimeDescriptorgetMimeType in interface MimeDescriptorpublic String getMimeSubType()
MimeDescriptorgetMimeSubType in interface MimeDescriptorpublic String getContentID()
MimeDescriptorContent-ID header value.getContentID in interface MimeDescriptorContent-ID, possibly nullpublic String getContentDescription()
MimeDescriptorContent-Description header value.getContentDescription in interface MimeDescriptorContent-Description, possibly nullpublic String getContentLocation()
MimeDescriptorContent-Location header value.getContentLocation in interface MimeDescriptorContent-Location, possibly nullpublic String getContentMD5()
MimeDescriptorContent-MD5 header value.getContentMD5 in interface MimeDescriptorContent-MD5, possibly nullpublic String getTransferContentEncoding()
MimeDescriptorgetTransferContentEncoding in interface MimeDescriptorContent-Transfer-Encoding, possibly nullpublic List<String> getLanguages()
MimeDescriptorContent-Language header
value.getLanguages in interface MimeDescriptorList of String namespublic String getDisposition()
MimeDescriptorContent-Disposition.getDisposition in interface MimeDescriptorContent-Disposition, or null if no disposition
header existspublic Map<String,String> getDispositionParams()
MimeDescriptorContent-Disposition parameters.getDispositionParams in interface MimeDescriptorContent-Disposition values indexed by namespublic long getLines()
MimeDescriptorTEXT when
transfer encoded.getLines in interface MimeDescriptorCRLF count when a TEXT type, otherwise
-1public long getBodyOctets()
MimeDescriptorgetBodyOctets in interface MimeDescriptorpublic Iterator<MimeDescriptor> parts()
MimeDescriptorparts in interface MimeDescriptorMimeDescriptor Iterator when a
composite top level MIME media type, null otherwisepublic MimeDescriptor embeddedMessage()
embeddedMessage in interface MimeDescriptorMimeDescriptor when top level MIME type is
message, null otherwisepublic Map<String,String> contentTypeParameters()
MimeDescriptorContent-Type.contentTypeParameters in interface MimeDescriptorHeader Iterator, not nullCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.