class MimeMessageWrapper extends MimeMessage implements Disposable {

    @Override
    public synchronized int getSize() throws MessagingException {
        if (source != null) {
            try {
                long fullSize = source.getMessageSize();
                if (headers == null) {
                    loadHeaders();
                }
                // 2 == CRLF
                return (int) (fullSize - initialHeaderSize - 2);

            } catch (IOException e) {
                throw new MessagingException("Unable to calculate message size");
            }
        } else {
            if (!messageParsed) {
                loadMessage();
            }

            return super.getSize();
        }

    }

    private  MimeMessageWrapper(Session session);
    public  MimeMessageWrapper(Session session, MimeMessageSource source);
    public  MimeMessageWrapper(MimeMessageSource source);
    public  MimeMessageWrapper(MimeMessage original);

}