TrueZIP 6.8.3

de.schlichtherle.io.samples
Class Encrypt

java.lang.Object
  extended by de.schlichtherle.io.samples.CommandLineUtility
      extended by de.schlichtherle.io.samples.Encrypt

public class Encrypt
extends CommandLineUtility

Encrypts the contents of the file provided as the first argument into the RAES file provided as the second argument for the main method.

Please note that you should not use this utility to encrypt a plain ZIP file to an RAES encrypted ZIP file (usually a files with a ".tzp" or ".zip.rae" suffix). This is because RAES encrypted ZIP files use the "UTF-8" as their character set, whereas plain ZIP files use "IBM437", a.k.a. "CP437". To encrypt a plain ZIP file to an RAES encrypted ZIP file, use the "cp" command of the NZip class instead. This class knows about the correct character sets for the various flavours of ZIP compatible files.

Since:
TrueZIP 6.5
Author:
Christian Schlichtherle

Nested Class Summary
 class Encrypt.IllegalUsageException
           
 
Nested classes/interfaces inherited from class de.schlichtherle.io.samples.CommandLineUtility
CommandLineUtility.ProgressMonitor
 
Field Summary
private static String CLASS_NAME
           
private static ResourceBundle resources
           
 
Fields inherited from class de.schlichtherle.io.samples.CommandLineUtility
err, out, progressMonitor
 
Constructor Summary
Encrypt()
           
Encrypt(OutputStream out, OutputStream err, boolean autoFlush)
           
 
Method Summary
static void main(String[] args)
          Equivalent to System.exit(new Encrypt().run(args));.
 boolean runWithException(String[] args)
          Runs this command line utility.
 
Methods inherited from class de.schlichtherle.io.samples.CommandLineUtility
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

private static final String CLASS_NAME
See Also:
Constant Field Values

resources

private static final ResourceBundle resources
Constructor Detail

Encrypt

public Encrypt()

Encrypt

public Encrypt(OutputStream out,
               OutputStream err,
               boolean autoFlush)
Method Detail

main

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


runWithException

public boolean runWithException(String[] args)
                         throws Encrypt.IllegalUsageException,
                                IOException
Description copied from class: CommandLineUtility
Runs this command line utility. Throws an exception if an error occurs.

Specified by:
runWithException in class CommandLineUtility
Parameters:
args - A non-empty array of Unix-like commands and optional parameters.
Returns:
false iff the command is a test which fails, true otherwise.
Throws:
IOException - On any I/O related exception.
Encrypt.IllegalUsageException

TrueZIP 6.8.3

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