Package dk.netarkivet.common.tools
Class ArcWrap
- java.lang.Object
-
- dk.netarkivet.common.tools.ToolRunnerBase
-
- dk.netarkivet.common.tools.ArcWrap
-
public class ArcWrap extends ToolRunnerBase
Command line tool for creating an ARC file from given data. Uses ToolRunnerBase and SimpleCmdlineTool to coordinate task. Usage: java dk.netarkivet.common.tools.ArcWrap input_file uri mime-type > myarchive.arc Note: Does not depend on logging - communicates failure on stderr
-
-
Constructor Summary
Constructors Constructor Description ArcWrap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Main method.protected SimpleCmdlineTool
makeMyTool()
Factory method.-
Methods inherited from class dk.netarkivet.common.tools.ToolRunnerBase
runTheTool, showMessage
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Main method. Reads given content and outputs an ARC file on stdout. The output ARC file has two records: the ARC file header and one record containing the given content. The uri and mimetype of the latter record are specified as command line parameters. Setup, teardown and run is delegated to the ArcWrapTool class. Management of this, exception handling etc. is delegated to ToolRunnerBase class.- Parameters:
args
- Takes three command line parameters: - input file (the content to archive) - uri (the name to record the content by) - mime-type (the type to record for the content)
-
makeMyTool
protected SimpleCmdlineTool makeMyTool()
Description copied from class:ToolRunnerBase
Factory method. Creates and returns the intended specific implementation of a command line tool.- Specified by:
makeMyTool
in classToolRunnerBase
- Returns:
- An implementation of the SimpleCmdlineTool interface.
-
-