throws IOException, MimeException {
MaximalBodyDescriptor descriptor = (MaximalBodyDescriptor) parser
.getBodyDescriptor();
MimeDescriptorImpl mimeDescriptor = createDescriptor(0, 0, descriptor,
null, headers);
EntityState next = parser.next();
while (next != EntityState.T_END_MULTIPART
&& next != EntityState.T_END_OF_STREAM) {
if (next == EntityState.T_START_BODYPART) {
mimeDescriptor.addPart(createDescriptor(parser));
}