Examples of MimeConfig


Examples of com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig

     *
     * @return
     */
    public MIMEConfig getConfig() {
        if (config == null) {
            config = new MIMEConfig();
            config.setDir(dir);
            config.setParseEagerly(parseEagerly);
            config.setMemoryThreshold(memoryThreshold);
            config.validate();
        }
View Full Code Here

Examples of com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig

     * @return
     */
    @ManagedAttribute
    public MIMEConfig getConfig() {
        if (config == null) {
            config = new MIMEConfig();
            config.setDir(dir);
            config.setParseEagerly(parseEagerly);
            config.setMemoryThreshold(memoryThreshold);
            config.validate();
        }
View Full Code Here

Examples of com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig

        try {
            if (soapPart != null) {
                return;
            }
            in = dataSource.getInputStream();
            MIMEConfig config = new MIMEConfig(); //use defaults
            mm = new MIMEMessage(in, boundary, config);
            String st = contType.getParameter("start");
            if(startParam == null) {
                soapPart = mm.getPart(0);
            } else {
View Full Code Here

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

            is = filterIS;
        } else {
            filterIS = null;
        }
       
        MimeConfig config = new MimeConfig();
        config.setStrictParsing(true);
        parser = new MimeTokenStream(config);
        parser.setRecursionMode(RecursionMode.M_NO_RECURSE);
        parser.parseHeadless(is, contentTypeString);
       
        // Move the parser to the beginning of the first part
View Full Code Here

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

                    new ByteArrayInputStream(data), handler, metadata, context);
            fail();
        } catch (TikaException expected) {
        }

        MimeConfig config = new MimeConfig();
        config.setMaxHeaderLen(-1);
        config.setMaxLineLen(-1);
        context.set(MimeConfig.class, config);
        parser.parse(
                new ByteArrayInputStream(data), handler, metadata, context);
        assertEquals(name.trim(), metadata.get(TikaCoreProperties.CREATOR));
    }
View Full Code Here

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

    @Override
    protected void runTest() throws Throwable {
        MimeStreamParser parser = null;
        TestHandler handler = null;
        MimeConfig config = new MimeConfig();
        if (getName().startsWith("malformedHeaderStartsBody")) {
            config.setMalformedHeaderStartsBody(true);
        }
        config.setMaxLineLen(-1);
        parser = new MimeStreamParser(config);
        handler = new TestHandler();

        parser.setContentHandler(handler);
        parser.parse(url.openStream());
View Full Code Here

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

    public MimeStreamParser(
            final MimeConfig config,
            final DecodeMonitor monitor,
            final BodyDescriptorBuilder bodyDescBuilder) {
        this(new MimeTokenStream(config != null ? config.clone() : new MimeConfig(),
                monitor, bodyDescBuilder));
    }
View Full Code Here

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

    public MimeStreamParser(final MimeConfig config) {
        this(config, null, null);
    }

    public MimeStreamParser() {
        this(new MimeTokenStream(new MimeConfig(), null, null));
    }
View Full Code Here

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

     * @param instream the stream to parse.
     * @throws MimeException if the message can not be processed
     * @throws IOException on I/O errors.
     */
    public void parse(InputStream instream) throws MimeException, IOException {
        MimeConfig config = mimeTokenStream.getConfig();
        if (config.getHeadlessParsing() != null) {
            Field contentType = mimeTokenStream.parseHeadless(
                    instream, config.getHeadlessParsing());
            handler.startMessage();
            handler.startHeader();
            handler.field(contentType);
            handler.endHeader();
        } else {
View Full Code Here

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

    public Multipart newMultipart(final Multipart source) {
        return copy(source);
    }

    public Header parseHeader(final InputStream is) throws IOException, MimeIOException {
        final MimeConfig cfg = config != null ? config : new MimeConfig();
        boolean strict = cfg.isStrictParsing();
        final DecodeMonitor mon = monitor != null ? monitor :
            strict ? DecodeMonitor.STRICT : DecodeMonitor.SILENT;
        final FieldParser<? extends ParsedField> fp = fieldParser != null ? fieldParser :
            strict ? DefaultFieldParser.getParser() : LenientFieldParser.getParser();
        final HeaderImpl header = new HeaderImpl();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.