|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.javascriptzip.JavaScriptZip
public class JavaScriptZip
This class processes the JavaScript compression.
The compress methods is
overloaded on two forms: One takes the String containing the script source,
and returns the compressed contents; and other that receives an input and
output file.
The main method may be called externally also.
| Constructor Summary | |
|---|---|
JavaScriptZip()
|
|
| Method Summary | |
|---|---|
static JavaScriptZip |
buildFromArguments(java.lang.String[] args)
Returns an instance built from the command-line arguments. |
static JavaScriptZip |
buildFromProperties(java.util.Properties props)
Returns an instance built from a Properties object. |
void |
compress()
Compress the script, getting the input and output from this instance's input and output properties |
void |
compress(java.io.File in,
java.io.File out)
Compress the input file, storing it on the output file |
java.lang.String |
compress(java.lang.String script)
Compress the script, represented by the input string |
java.lang.String |
getFooter()
|
java.lang.String |
getHeader()
|
java.io.File |
getInput()
|
java.io.File |
getOutput()
|
boolean |
isDisableOptimizations()
|
static void |
main(java.lang.String[] args)
Runs JavaScriptZip from the command line. |
void |
setDisableOptimizations(boolean disableOptimizations)
|
void |
setFooter(java.lang.String footer)
|
void |
setHeader(java.lang.String header)
|
void |
setInput(java.io.File input)
|
void |
setOutput(java.io.File output)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaScriptZip()
| Method Detail |
|---|
public static JavaScriptZip buildFromArguments(java.lang.String[] args)
args - The arguments.
public static JavaScriptZip buildFromProperties(java.util.Properties props)
props - The properties. The following properties are read: input,
output, header, footer and disableOptimizations
public static void main(java.lang.String[] args)
args - The command line arguments
public void compress()
throws java.io.IOException
input and output properties
java.io.IOException - Error reading / writing the files
public void compress(java.io.File in,
java.io.File out)
throws java.io.IOException
in - The input fileout - The output file
java.io.IOException - Error reading / writing the filespublic java.lang.String compress(java.lang.String script)
script - The original script contents
public java.lang.String getFooter()
public java.lang.String getHeader()
public java.io.File getInput()
public java.io.File getOutput()
public boolean isDisableOptimizations()
public void setDisableOptimizations(boolean disableOptimizations)
public void setFooter(java.lang.String footer)
footer - The footer to set.public void setHeader(java.lang.String header)
header - The header to set.public void setInput(java.io.File input)
public void setOutput(java.io.File output)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||