private boolean isComplex() { return isComplex(parts.get(0).getContentType()); }
private boolean isComplex() { return isComplex(parts.get(0).getContentType()); }
private boolean isComplex() { return isComplex(parts.get(0).getContentType()); }
/** * Writes the Payload to the specified output stream. * * @param os the OutputStream to which the Payload should be written * @throws java.io.IOException */ @Override public void writeTo(final OutputStream os) throws IOException { if (isComplex()) { writePartsTo(os); } else { parts.get(0).copy(os); } }
String getSinglePartContentType() { /* * If the one part is text/? then return it as the single-part * content type. Otherwise the more complicated part is stored * in an implementation-dependent way so we need to return */ String partType = parts.get(0).getContentType(); if (isComplex(partType)) { return getComplexContentType(); } else { return partType; } }
@Override public String getContentType() { return (isComplex()) ? getComplexContentType() : getSinglePartContentType(); }
/** * Writes the Payload to the specified output stream. * * @param os the OutputStream to which the Payload should be written * @throws java.io.IOException */ @Override public void writeTo(final OutputStream os) throws IOException { if (isComplex()) { writePartsTo(os); } else { parts.get(0).copy(os); } }
@Override public String getContentType() { return (isComplex()) ? getComplexContentType() : getSinglePartContentType(); }
String getSinglePartContentType() { /* * If the one part is text/? then return it as the single-part * content type. Otherwise the more complicated part is stored * in an implementation-dependent way so we need to return */ String partType = parts.get(0).getContentType(); if (isComplex(partType)) { return getComplexContentType(); } else { return partType; } }
String getSinglePartContentType() { /* * If the one part is text/? then return it as the single-part * content type. Otherwise the more complicated part is stored * in an implementation-dependent way so we need to return */ String partType = parts.get(0).getContentType(); if (isComplex(partType)) { return getComplexContentType(); } else { return partType; } }
/** * Writes the Payload to the specified output stream. * * @param os the OutputStream to which the Payload should be written * @throws java.io.IOException */ @Override public void writeTo(final OutputStream os) throws IOException { if (isComplex()) { writePartsTo(os); } else { parts.get(0).copy(os); } }
@Override public String getContentType() { return (isComplex()) ? getComplexContentType() : getSinglePartContentType(); }