private void clearMimePartStream() { currentMimePartStream = null; dataStream = new LineReaderInputStreamAdaptor( inbuffer, config.getMaxLineLen()); }
private void createMimePartStream() throws MimeException, IOException { String boundary = body.getBoundary(); if (boundary == null) { throw new MimeException("Multipart body does not have a valid boundary"); } try { currentMimePartStream = new MimeBoundaryInputStream(inbuffer, boundary, config.isStrictParsing()); } catch (IllegalArgumentException e) { // thrown when boundary is too long throw new MimeException(e.getMessage(), e); } dataStream = new LineReaderInputStreamAdaptor( currentMimePartStream, config.getMaxLineLen()); }
instream, 4 * 1024, config.getMaxLineLen()); this.dataStream = new LineReaderInputStreamAdaptor( inbuffer, config.getMaxLineLen());
public static MimeConfig.Builder copy(final MimeConfig config) { if (config == null) { throw new IllegalArgumentException("Config may not be null"); } return new Builder() .setStrictParsing(config.isStrictParsing()) .setMaxLineLen(config.getMaxLineLen()) .setMaxHeaderCount(config.getMaxHeaderCount()) .setMaxHeaderLen(config.getMaxHeaderLen()) .setMaxContentLen(config.getMaxContentLen()) .setCountLineNumbers(config.isCountLineNumbers()) .setHeadlessParsing(config.getHeadlessParsing()) .setMalformedHeaderStartsBody(config.isMalformedHeaderStartsBody()); }