Package org.apache.james.mime4j.stream

Examples of org.apache.james.mime4j.stream.RawField


       
        MessageImpl message = new MessageImpl();
        message.setMultipart(multipart);
        message.setSubject("Template message");
        message.setDate(new Date());
        message.getHeader().setField(new RawField(LIST_ID, "<list.example.com>"));

        assertSaveMessageWithAttachments(message, 6);
    }
View Full Code Here


        MessageImpl message = new MessageImpl();
        message.setMultipart(multipart);
        message.setSubject("Template message");
        message.setDate(new Date());
        message.getHeader().setField(new RawField(LIST_ID, "<list.example.com>"));

        assertSaveMessageWithAttachments(message, 5);
    }
View Full Code Here

     */
    public static ParsedField parse(
            final String rawStr,
            final DecodeMonitor monitor) throws MimeException {
        ByteSequence raw = ContentUtil.encode(rawStr);
        RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
        // Do not retain the original raw representation as the field
        // may require folding
        return PARSER.parse(rawField, monitor);
    }
View Full Code Here

     */
    public static ParsedField parse(
            final String rawStr,
            final DecodeMonitor monitor) throws MimeException {
        ByteSequence raw = ContentUtil.encode(rawStr);
        RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
        // Do not retain the original raw representation as the field
        // may require folding
        return PARSER.parse(rawField, monitor);
    }
View Full Code Here

        return addressList;
    }

    private void parse() {
        parsed = true;
        RawField f = getRawField();
        ByteSequence buf = f.getRaw();
        int pos = f.getDelimiterIdx() + 1;
        if (buf == null) {
            String body = f.getBody();
            if (body == null) {
                addressList = new AddressList(Collections.<Mailbox>emptyList(), true);
                return;
            }
            buf = ContentUtil.encode(body);
View Full Code Here

        }
    }

    private void parse() {
        parsed = true;
        RawField f = getRawField();
        RawBody body = RawFieldParser.DEFAULT.parseRawBody(f);
        String main = body.getValue();
        if (main != null) {
            dispositionType = main.toLowerCase(Locale.US);
        } else {
View Full Code Here

        return getParameter(PARAM_CHARSET);
    }

    private void parse() {
        parsed = true;
        RawField f = getRawField();
        RawBody body = RawFieldParser.DEFAULT.parseRawBody(f);
        String main = body.getValue();
        String type = null;
        String subtype = null;
        if (main != null) {
View Full Code Here

        return mailbox;
    }

    private void parse() {
        parsed = true;
        RawField f = getRawField();
        ByteSequence buf = f.getRaw();
        int pos = f.getDelimiterIdx() + 1;
        if (buf == null) {
            String body = f.getBody();
            if (body == null) {
                return;
            }
            buf = ContentUtil.encode(body);
            pos = 0;
View Full Code Here

    }

    private void parse() {
        parsed = true;
        languages = new ArrayList<String>();
        RawField f = getRawField();
        ByteSequence buf = f.getRaw();
        int pos = f.getDelimiterIdx() + 1;
        if (buf == null) {
            String body = f.getBody();
            if (body == null) {
                return;
            }
            buf = ContentUtil.encode(body);
            pos = 0;
View Full Code Here

        return EncoderUtil.isToken(dispositionType);
    }

    private static <F extends ParsedField> F parse(FieldParser<F> parser,
            String fieldName, String fieldBody) {
        RawField rawField = new RawField(fieldName, fieldBody);
        return parser.parse(rawField, DecodeMonitor.SILENT);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mime4j.stream.RawField

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.