TrueZIP Samples 7.0-rc2

de.schlichtherle.truezip.sample.file.app
Class PathCat

java.lang.Object
  extended by de.schlichtherle.truezip.sample.file.app.CommandLineUtility
      extended by de.schlichtherle.truezip.sample.file.app.PathCat

public class PathCat
extends CommandLineUtility

A poor man's imitate of the cat(1) command line utility for concatenating the contents of each parameter path name on the standard output.

Author:
Christian Schlichtherle

Nested Class Summary
 
Nested classes/interfaces inherited from class de.schlichtherle.truezip.sample.file.app.CommandLineUtility
CommandLineUtility.IllegalUsageException, CommandLineUtility.ProgressMonitor
 
Field Summary
 
Fields inherited from class de.schlichtherle.truezip.sample.file.app.CommandLineUtility
err, monitor, out
 
Constructor Summary
PathCat()
           
 
Method Summary
static void main(String[] args)
          Equivalent to System.exit(new PathCat().run(args));.
(package private) static void pathCat(String resource)
          Copies the contents of the parameter resource to the standard output.
 int runChecked(String[] args)
          Runs this command line utility.
 
Methods inherited from class de.schlichtherle.truezip.sample.file.app.CommandLineUtility
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathCat

public PathCat()
Method Detail

main

public static void main(String[] args)
Equivalent to System.exit(new PathCat().run(args));.


runChecked

public int runChecked(String[] args)
               throws IOException
Description copied from class: CommandLineUtility
Runs this command line utility. Throws an exception if an error occurs.

Specified by:
runChecked in class CommandLineUtility
Parameters:
args - a non-null array of command line parameters.
Returns:
the return code for System.exit(int).
Throws:
IOException - On any I/O related exception.

pathCat

static void pathCat(String resource)
             throws IOException
Copies the contents of the parameter resource to the standard output.

Parameters:
resource - the path name string of the resource to copy.
Throws:
IOException - if accessing the resource results in an I/O error.

TrueZIP Samples 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.