Class CreateScriptFile


  • public class CreateScriptFile
    extends java.lang.Object
    This sample application shows how to manually create an encrypted and compressed script file.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String... args)
      This method is called when executing this sample application from the command line.
      static java.io.LineNumberReader openScriptReader​(java.lang.String fileName, java.lang.String compressionAlgorithm, java.lang.String cipher, java.lang.String password, java.lang.String charset)
      Open a script reader.
      static java.io.PrintWriter openScriptWriter​(java.lang.String fileName, java.lang.String compressionAlgorithm, java.lang.String cipher, java.lang.String password, java.lang.String charset)
      Open a script writer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CreateScriptFile

        public CreateScriptFile()
    • Method Detail

      • main

        public static void main​(java.lang.String... args)
                         throws java.lang.Exception
        This method is called when executing this sample application from the command line.
        Parameters:
        args - the command line parameters
        Throws:
        java.lang.Exception - on failure
      • openScriptWriter

        public static java.io.PrintWriter openScriptWriter​(java.lang.String fileName,
                                                           java.lang.String compressionAlgorithm,
                                                           java.lang.String cipher,
                                                           java.lang.String password,
                                                           java.lang.String charset)
                                                    throws java.io.IOException
        Open a script writer.
        Parameters:
        fileName - the file name (the file will be overwritten)
        compressionAlgorithm - the compression algorithm (uppercase)
        cipher - the encryption algorithm or null
        password - the encryption password
        charset - the character set (for example UTF-8)
        Returns:
        the print writer
        Throws:
        java.io.IOException - on failure
      • openScriptReader

        public static java.io.LineNumberReader openScriptReader​(java.lang.String fileName,
                                                                java.lang.String compressionAlgorithm,
                                                                java.lang.String cipher,
                                                                java.lang.String password,
                                                                java.lang.String charset)
                                                         throws java.io.IOException
        Open a script reader.
        Parameters:
        fileName - the file name (the file will be overwritten)
        compressionAlgorithm - the compression algorithm (uppercase)
        cipher - the encryption algorithm or null
        password - the encryption password
        charset - the character set (for example UTF-8)
        Returns:
        the script reader
        Throws:
        java.io.IOException - on failure