net.sf.appinfo.reader
Class FileManifestReader

java.lang.Object
  extended by net.sf.appinfo.reader.AbstractManifestReader
      extended by net.sf.appinfo.reader.FileManifestReader
All Implemented Interfaces:
ManifestReader

public class FileManifestReader
extends AbstractManifestReader

ManifestReader implementation reading manifest from given file.

Author:
Marcin ZajÄ…czkowski, 2010-07-01

Constructor Summary
FileManifestReader(String pathToManifest)
          Creates reader with set given path to a manifest file.
 
Method Summary
protected  Manifest initializeAndReturnManifest()
          Delegated initialization (and return of) Manifest object.
 
Methods inherited from class net.sf.appinfo.reader.AbstractManifestReader
getManifest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManifestReader

public FileManifestReader(String pathToManifest)
Creates reader with set given path to a manifest file.

Parameters:
pathToManifest - path to manifest file
Method Detail

initializeAndReturnManifest

protected Manifest initializeAndReturnManifest()
                                        throws ReaderInitializationException,
                                               IOException
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.