@Nonnull
	private static DataSource createDataSource(@Nonnull final MimePart part) {
		final DataHandler dataHandler = retrieveDataHandler(part);
		final DataSource dataSource = dataHandler.getDataSource();
		final String contentType = parseBaseMimeType(dataSource.getContentType());
		final byte[] content = readContent(retrieveInputStream(dataSource));
		final ByteArrayDataSource result = new ByteArrayDataSource(content, contentType);
		final String dataSourceName = parseDataSourceName(part, dataSource);

		result.setName(dataSourceName);
		return result;
	}
@ Nonnull private static DataSource createDataSource ( @ Nonnull final MimePart part ) { final DataHandler dataHandler = retrieveDataHandler ( part ) ; final DataSource dataSource = dataHandler . getDataSource ( ) ; final String contentType = parseBaseMimeType ( dataSource . getContentType ( ) ) ; final byte [ ] content = readContent ( retrieveInputStream ( dataSource ) ) ; final ByteArrayDataSource result = new ByteArrayDataSource ( content , contentType ) ; final String dataSourceName = parseDataSourceName ( part , dataSource ) ; result . setName ( dataSourceName ) ; return result ; }
Parses the MimePart to create a DataSource.

@param part the current part to be processed
@return the DataSource