Class PyPACoreMetadataParser


  • public final class PyPACoreMetadataParser
    extends java.lang.Object
    A utility class to handle Python Packaging Authority (PyPA) core metadata files. It was created based on the specification by PyPA for version 2.2
    Author:
    Hans Aikema
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Properties getProperties​(java.io.BufferedReader utf8Reader)
      Loads all key/value pairs from PyPA metadata specifications¶.
      static java.util.Properties getProperties​(java.io.File file)
      Loads all key/value pairs from PyPA metadata specifications¶.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getProperties

        public static java.util.Properties getProperties​(java.io.File file)
                                                  throws AnalysisException
        Loads all key/value pairs from PyPA metadata specifications¶.
        Parameters:
        file - The Wheel metadata of a Python package as a File
        Returns:
        The metadata properties read from the file
        Throws:
        AnalysisException - thrown if there is an analysis exception
      • getProperties

        public static java.util.Properties getProperties​(java.io.BufferedReader utf8Reader)
                                                  throws java.io.IOException
        Loads all key/value pairs from PyPA metadata specifications¶.
        Parameters:
        utf8Reader - The Wheel metadata of a Python package as a BufferedReader
        Returns:
        The metadata properties read from the utf8Reader
        Throws:
        java.io.IOException - thrown if there is error reading the properties