code: private List<DataSource> parsePartsCore(InputStream entityInputStream,
              String contentType) throws MessagingException, IOException {
          DataSource dataSource = new InputStreamDataSource(entityInputStream,
                  contentType);
          MimeMultipart batch = new MimeMultipart(dataSource);
          MimeBodyPart batchBody = (MimeBodyPart) batch.getBodyPart(0);
  
          MimeMultipart changeSets = new MimeMultipart(new MimePartDataSource(
                  batchBody));
  
          List<DataSource> result = new ArrayList<DataSource>();
          for (int i = 0; i < changeSets.getCount(); i++) {
              BodyPart part = changeSets.getBodyPart(i);
  
              result.add(new InputStreamDataSource(part.getInputStream(), part
                      .getContentType()));
          }
          return result;
      }
docs: Parses the parts core.
  
  @param entityInputStream
  the entity input stream
  @param contentType
  the content type
  @return the list
  @throws MessagingException
  the messaging exception
  @throws IOException
  Signals that an I/O exception has occurred.