List of usage examples for javax.mail.internet InternetHeaders load
public void load(InputStream is) throws MessagingException
From source file:org.owasp.dependencycheck.analyzer.PythonDistributionAnalyzer.java
/** * Reads the manifest entries from the provided file. * * @param manifest the manifest//w ww.j a v a 2 s . c o m * @return the manifest entries */ private static InternetHeaders getManifestProperties(File manifest) { final InternetHeaders result = new InternetHeaders(); if (null == manifest) { LOGGER.debug("Manifest file not found."); } else { try { result.load(new AutoCloseInputStream(new BufferedInputStream(new FileInputStream(manifest)))); } catch (MessagingException e) { LOGGER.warn(e.getMessage(), e); } catch (FileNotFoundException e) { LOGGER.warn(e.getMessage(), e); } } return result; }