Package org.h2.samples
Class CreateScriptFile
- java.lang.Object
-
- org.h2.samples.CreateScriptFile
-
public class CreateScriptFile extends java.lang.ObjectThis sample application shows how to manually create an encrypted and compressed script file.
-
-
Constructor Summary
Constructors Constructor Description CreateScriptFile()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String... args)This method is called when executing this sample application from the command line.static java.io.LineNumberReaderopenScriptReader(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.PrintWriteropenScriptWriter(java.lang.String fileName, java.lang.String compressionAlgorithm, java.lang.String cipher, java.lang.String password, java.lang.String charset)Open a script writer.
-
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.lang.ExceptionThis 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.IOExceptionOpen a script writer.- Parameters:
fileName- the file name (the file will be overwritten)compressionAlgorithm- the compression algorithm (uppercase)cipher- the encryption algorithm or nullpassword- the encryption passwordcharset- 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.IOExceptionOpen a script reader.- Parameters:
fileName- the file name (the file will be overwritten)compressionAlgorithm- the compression algorithm (uppercase)cipher- the encryption algorithm or nullpassword- the encryption passwordcharset- the character set (for example UTF-8)- Returns:
- the script reader
- Throws:
java.io.IOException- on failure
-
-