SampleResult sr = new SampleResult();
sr.setSampleLabel("Part: "+j);
sr.setContentType(contentType);
sr.setDataEncoding(RFC_822_DEFAULT_ENCODING);
sr.setEncodingAndType(contentType);
sr.sampleStart();
if (bodyPartContent instanceof InputStream){
sr.setResponseData(IOUtils.toByteArray((InputStream) bodyPartContent));
} else if (bodyPartContent instanceof MimeMultipart){
appendMultiPart(sr, cdata, (MimeMultipart) bodyPartContent);
} else {