dk.netarkivet.common.tools
Class ArcWrap

java.lang.Object
  extended by dk.netarkivet.common.tools.ToolRunnerBase
      extended by 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
ArcWrap()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main method.
protected  SimpleCmdlineTool makeMyTool()
          Factory method.
 
Methods inherited from class dk.netarkivet.common.tools.ToolRunnerBase
runTheTool, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcWrap

public ArcWrap()
Method Detail

main

public static void main(java.lang.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 class ToolRunnerBase
Returns:
An implementation of the SimpleCmdlineTool interface.