* @throws IOException
*/
public JPAStreamingMessage(JPAMailbox mailbox, long uid, long modSeq, Message<?> message) throws MailboxException {
super(mailbox, uid, modSeq, message);
try {
this.content = new SharedByteArrayInputStream(IOUtils.toByteArray(ResultUtils.toInput(message)));
this.header = getHeaderContent();
this.body = getBodyContent();
} catch (IOException e) {
throw new MailboxException("Unable to parse message",e);
}