private void encodeMultipart(ImapResponseComposer composer, Structure structure, String subType, boolean includeExtensions, ImapSession session) throws IOException { composer.openParen(); for (Iterator<Structure> it = structure.parts(); it.hasNext();) { final Structure part = it.next(); encodeStructure(composer, part, includeExtensions, true, session); } composer.quoteUpperCaseAscii(subType); if (includeExtensions) { final List<String> languages = structure.getLanguages(); nillableQuotes(composer, structure.getParameters()); bodyFldDsp(structure, composer, session); nillableQuotes(composer, languages); nillableQuote(composer, structure.getLocation()); } composer.closeParen(); }
private void encodeMultipart(ImapResponseComposer composer, Structure structure, final String subType, final boolean includeExtensions, ImapSession session) throws IOException { composer.openParen(); for (Iterator<Structure> it = structure.parts(); it.hasNext();) { final Structure part = it.next(); encodeStructure(composer, part, includeExtensions, true, session); } composer.quoteUpperCaseAscii(subType); if (includeExtensions) { final List<String> languages = structure.getLanguages(); nillableQuotes(composer, structure.getParameters()); bodyFldDsp(structure, composer, session); nillableQuotes(composer, languages); nillableQuote(composer, structure.getLocation()); } composer.closeParen(); }
private void encodeOnePartBodyExtensions(final ImapResponseComposer composer, final Structure structure, ImapSession session) throws IOException { final String md5 = structure.getMD5(); final List<String> languages = structure.getLanguages(); final String location = structure.getLocation(); nillableQuote(composer, md5); bodyFldDsp(structure, composer, session); nillableQuotes(composer, languages); nillableQuote(composer, location); }
private void encodeOnePartBodyExtensions(ImapResponseComposer composer, Structure structure, ImapSession session) throws IOException { final String md5 = structure.getMD5(); final List<String> languages = structure.getLanguages(); final String location = structure.getLocation(); nillableQuote(composer, md5); bodyFldDsp(structure, composer, session); nillableQuotes(composer, languages); nillableQuote(composer, location); }
private void encodeBodyFields(ImapResponseComposer composer, Structure structure, String mediaType, String subType) throws IOException { final List<String> bodyParams = structure.getParameters(); final String id = structure.getId(); final String description = structure.getDescription(); final String encoding = structure.getEncoding(); final long octets = structure.getOctets(); composer.openParen().quoteUpperCaseAscii(mediaType).quoteUpperCaseAscii(subType); nillableQuotes(composer, bodyParams); nillableQuote(composer, id); nillableQuote(composer, description); composer.quoteUpperCaseAscii(encoding).message(octets); }
private void encodeBodyFields(final ImapResponseComposer composer, final Structure structure, final String mediaType, final String subType) throws IOException { final List<String> bodyParams = structure.getParameters(); final String id = structure.getId(); final String description = structure.getDescription(); final String encoding = structure.getEncoding(); final long octets = structure.getOctets(); composer.openParen().quoteUpperCaseAscii(mediaType).quoteUpperCaseAscii(subType); nillableQuotes(composer, bodyParams); nillableQuote(composer, id); nillableQuote(composer, description); composer.quoteUpperCaseAscii(encoding).message(octets); }