Package org.apache.james.mime4j.decoder

Examples of org.apache.james.mime4j.decoder.Base64InputStream


    public InputStream getDecodedInputStream() {
        BodyDescriptor bodyDescriptor = getBodyDescriptor();
        String transferEncoding = bodyDescriptor.getTransferEncoding();
        InputStream dataStream = currentStateMachine.getContentStream();
        if (MimeUtil.isBase64Encoding(transferEncoding)) {
            dataStream = new Base64InputStream(dataStream);
        } else if (MimeUtil.isQuotedPrintableEncoded(transferEncoding)) {
            dataStream = new QuotedPrintableInputStream(dataStream);
        }
        return dataStream;
    }
View Full Code Here


        public void body(BodyDescriptor bd, InputStream is) throws IOException {
            expect(Entity.class);
           
            String enc = bd.getTransferEncoding();
            if ("base64".equals(enc)) {
                is = new Base64InputStream(is);
            } else if ("quoted-printable".equals(enc)) {
                is = new QuotedPrintableInputStream(is);
            }
           
            Body body = null;
View Full Code Here

    /**
     * @see org.apache.james.mime4j.AbstractContentHandler#body(org.apache.james.mime4j.BodyDescriptor, java.io.InputStream)
     */
    public final void body(BodyDescriptor bd, InputStream is) throws IOException {
        if (bd.isBase64Encoded()) {
            bodyDecoded(bd, new Base64InputStream(is));
        }
        else if (bd.isQuotedPrintableEncoded()) {
            bodyDecoded(bd, new QuotedPrintableInputStream(is));
        }
        else {
View Full Code Here

           
        } else if (bd.isMessage()) {
            if (bd.isBase64Encoded()) {
                log.warn("base64 encoded message/rfc822 detected");
                is = new EOLConvertingInputStream(
                        new Base64InputStream(is));
            } else if (bd.isQuotedPrintableEncoded()) {
                log.warn("quoted-printable encoded message/rfc822 detected");
                is = new EOLConvertingInputStream(
                        new QuotedPrintableInputStream(is));
            }
View Full Code Here

TOP

Related Classes of org.apache.james.mime4j.decoder.Base64InputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.