@Entity(name="Message") public class JPAStreamingMessage extends AbstractJPAMessage
AbstractJPAMessage which use openjpas Persistent type to
be able to stream the message content without loading it into the memory at all.
This is not supported for all DB's yet. See Additional JPA Mappings
If your DB is not supported by this, use JPAMessage
TODO: Fix me!AbstractJPAMessage.MailboxIdUidKey| Constructor and Description |
|---|
JPAStreamingMessage()
Deprecated.
|
JPAStreamingMessage(JPAMailbox mailbox,
Date internalDate,
int size,
javax.mail.Flags flags,
javax.mail.internet.SharedInputStream content,
int bodyStartOctet,
PropertyBuilder propertyBuilder) |
JPAStreamingMessage(JPAMailbox mailbox,
long uid,
long modSeq,
Message<?> message)
Create a copy of the given message
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getBodyContent()
Gets the body content of the document.
|
InputStream |
getHeaderContent()
Gets the header as
InputStream. |
createUserFlags, equals, getBodyStartOctet, getFullContentOctets, getInternalDate, getMailbox, getMailboxId, getMediaType, getModSeq, getProperties, getSubType, getTextualLineCount, getUid, hashCode, isAnswered, isDeleted, isDraft, isFlagged, isRecent, isSeen, setFlags, setMailbox, setModSeq, setUid, toStringcompareTo, createFlags, getBodyOctets, getFullContent@Deprecated public JPAStreamingMessage()
public JPAStreamingMessage(JPAMailbox mailbox, Date internalDate, int size, javax.mail.Flags flags, javax.mail.internet.SharedInputStream content, int bodyStartOctet, PropertyBuilder propertyBuilder) throws MailboxException
MailboxExceptionpublic JPAStreamingMessage(JPAMailbox mailbox, long uid, long modSeq, Message<?> message) throws MailboxException
message - IOExceptionMailboxExceptionpublic InputStream getBodyContent() throws IOException
MessageInputStream
on every call, which basicly means it need to start at position 0IOExceptionMessage.getBodyContent()public InputStream getHeaderContent() throws IOException
MessageInputStream. This MUST INCLUDE the CRLF terminator
Be aware that this method need to return a new fresh InputStream
on every callIOExceptionMessage.getHeaderContent()Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.