@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, toString
compareTo, 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
MailboxException
public JPAStreamingMessage(JPAMailbox mailbox, long uid, long modSeq, Message<?> message) throws MailboxException
message
- IOException
MailboxException
public InputStream getBodyContent() throws IOException
Message
InputStream
on every call, which basicly means it need to start at position 0IOException
Message.getBodyContent()
public InputStream getHeaderContent() throws IOException
Message
InputStream
. This MUST INCLUDE the CRLF terminator
Be aware that this method need to return a new fresh InputStream
on every callIOException
Message.getHeaderContent()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.