net.sf.appinfo.reader
Class JarManifestReader
java.lang.Object
net.sf.appinfo.reader.AbstractManifestReader
net.sf.appinfo.reader.JarManifestReader
- All Implemented Interfaces:
- ManifestReader
public class JarManifestReader
- extends AbstractManifestReader
ManifestReader implementation getting manifest from a JAR file.
Proper JAR is pointed by a class places within an archive.
- Author:
- Marcin ZajÄ…czkowski, 2010-07-01
Constructor Summary |
JarManifestReader()
Uses itself (this) as a class in JAR which manifest file will be looked for. |
JarManifestReader(Class<?> classFromJar)
Uses given class as a class in JAR which manifest file will be looked for. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JarManifestReader
public JarManifestReader()
- Uses itself (this) as a class in JAR which manifest file will be looked for.
JarManifestReader
public JarManifestReader(Class<?> classFromJar)
- Uses given class as a class in JAR which manifest file will be looked for.
- Parameters:
classFromJar
- class from JAR
initializeAndReturnManifest
protected Manifest initializeAndReturnManifest()
throws ReaderInitializationException,
IOException
- Description copied from class:
AbstractManifestReader
- Delegated initialization (and return of) Manifest object.
Should be implemented in concreate classes which create Manifest from data in file, JAR, etc.
Throwing IOException isn't very pretty, but it allows to remove duplication and move conversion IOException to
ReaderInitializationException to a superclass. It's only internal method in ManifestReader hierarchy and
doesn't complicate cooperation with other classes.
- Specified by:
initializeAndReturnManifest
in class AbstractManifestReader
- Returns:
- initialized Manifest object
- Throws:
ReaderInitializationException
- other (no IO) error during Manifest initialization
IOException
- error during Manifest initialization
Copyright © 2010-2011. All Rights Reserved.