Class ManifestFile

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class ManifestFile extends JsonMap
Utility class for working with Jar manifest files.

Copies the contents of a Manifest into an JsonMap so that the various convenience methods on that class can be used to retrieve values.

See Also:
  • Constructor Details

    • ManifestFile

      public ManifestFile(File f) throws IOException
      Create an instance of this class from a manifest file on the file system.
      Parameters:
      f - The manifest file.
      Throws:
      IOException - If a problem occurred while trying to read the manifest file.
    • ManifestFile

      Create an instance of this class from a Manifest object.
      Parameters:
      f - The manifest to read from.
    • ManifestFile

      public ManifestFile(Class<?> c) throws IOException
      Finds and loads the manifest file of the jar file that the specified class is contained within.
      Parameters:
      c - The class to get the manifest file of.
      Throws:
      IOException - If a problem occurred while trying to read the manifest file.
    • ManifestFile

      public ManifestFile(Reader r) throws IOException
      Create an instance of this class loaded from the contents of a reader.

      Note that the input must end in a newline to pick up the last line!

      Parameters:
      r - The manifest file contents.
      Throws:
      IOException - If a problem occurred while trying to read the manifest file.
    • ManifestFile

      Create an instance of this class loaded from the contents of an input stream.

      Note that the input must end in a newline to pick up the last line!

      Parameters:
      is - The manifest file contents.
      Throws:
      IOException - If a problem occurred while trying to read the manifest file.
  • Method Details