|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.util.jar.InstallJars
public class InstallJars
* InstallJars - a utility to download and install files, Jars and Zips. * *
Field Summary | |
---|---|
static int |
BLOCK_COUNT
|
static int |
BLOCK_SIZE
|
static int |
bufferSize
|
protected boolean |
expand
|
protected String |
javaParams
|
protected static String |
MAGIC
|
protected static int |
OFFSET_CHKSUM
|
protected static int |
OFFSET_DEVMAJOR
|
protected static int |
OFFSET_DEVMINOR
|
protected static int |
OFFSET_END
|
protected static int |
OFFSET_GID
|
protected static int |
OFFSET_GNAME
|
protected static int |
OFFSET_LINKNAME
|
protected static int |
OFFSET_MAGIC
|
protected static int |
OFFSET_MODE
|
protected static int |
OFFSET_MTIME
|
protected static int |
OFFSET_NAME
|
protected static int |
OFFSET_PREFIX
|
protected static int |
OFFSET_SIZE
|
protected static int |
OFFSET_TYPE
|
protected static int |
OFFSET_UID
|
protected static int |
OFFSET_UNAME
|
protected static int |
OFFSET_VERSION
|
protected String |
propFilename
|
protected boolean |
run
|
protected boolean |
verbose
|
Constructor Summary | |
---|---|
InstallJars()
Constructor. |
|
InstallJars(boolean expand,
boolean verbose,
boolean run,
String propName,
String javaParams)
Contstructor. |
Method Summary | |
---|---|
protected void |
copyEntry(String target,
ZipInputStream zis,
ZipEntry ze)
Copy a zip entry. |
void |
copyStream(URLConnection conn,
String target)
|
protected String |
extraceFile(String name)
|
protected char |
extractChar(byte[] buf,
int index)
|
protected int |
extractInt(byte[] buf,
int index,
int length)
|
protected long |
extractLong(byte[] buf,
int index,
int length)
|
protected String |
extractString(byte[] buf,
int index,
int length)
|
boolean |
getExpand()
Get the expand mode state. |
protected String |
getExtension(String name)
|
protected String |
getFile(String name)
|
String |
getJavaParams()
Get the JavaParams mode state. |
String |
getPropFilename()
Get the propFilename mode state. |
boolean |
getRunMode()
Get the run mode state. |
boolean |
getVerbose()
Get the verbose mode state. |
String |
install()
Install based on a properties file |
void |
installClass(URLConnection conn,
String target,
boolean doExpand,
boolean doRun)
|
void |
installFile(String fileUrl,
String targetPath,
boolean doExpand,
boolean doRun)
Install a Zip/Jar file. |
void |
installGZip(URLConnection conn,
String target,
boolean doExpand,
boolean doRun)
|
void |
installJar(URLConnection conn,
String target,
boolean doExpand,
boolean doRun)
|
void |
installZip(URLConnection conn,
String target,
boolean doExpand,
boolean doRun)
|
protected boolean |
isEmptyBlock(byte[] buf,
int index)
|
protected int |
loadBytes(byte[] buf,
GZIPInputStream zis)
|
static void |
main(String[] args)
Main command line entry point. |
protected void |
prepDirs(String name)
|
protected void |
prepDirs(String name,
boolean includeLast)
|
protected void |
print(String s)
|
protected static void |
printHelp()
Print command help text. |
protected void |
println()
|
protected void |
println(String s)
|
protected void |
printUsage()
|
protected void |
pumpGZip(String target,
GZIPInputStream zis)
|
protected String |
removeExtension(String name)
|
protected String |
removeFile(String name)
|
protected void |
runTarget(String target,
boolean isJar)
|
void |
setExpand(boolean f)
Set the expand mode state. |
void |
setJavaParams(String p)
Set the JavaParams mode state. |
void |
setPropFilename(String name)
Set the propFilename mode state. |
void |
setRunMode(boolean f)
Set the run mode state. |
void |
setVerbose(boolean f)
Set the verbose mode state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BLOCK_SIZE
public static final int BLOCK_COUNT
public static int bufferSize
protected boolean verbose
protected boolean run
protected boolean expand
protected String propFilename
protected String javaParams
protected static final int OFFSET_NAME
protected static final int OFFSET_MODE
protected static final int OFFSET_UID
protected static final int OFFSET_GID
protected static final int OFFSET_SIZE
protected static final int OFFSET_MTIME
protected static final int OFFSET_CHKSUM
protected static final int OFFSET_TYPE
protected static final int OFFSET_LINKNAME
protected static final int OFFSET_MAGIC
protected static final int OFFSET_VERSION
protected static final int OFFSET_UNAME
protected static final int OFFSET_GNAME
protected static final int OFFSET_DEVMAJOR
protected static final int OFFSET_DEVMINOR
protected static final int OFFSET_PREFIX
protected static final int OFFSET_END
protected static final String MAGIC
Constructor Detail |
---|
public InstallJars()
public InstallJars(boolean expand, boolean verbose, boolean run, String propName, String javaParams)
expand
- true
if the archive is t be expanded in the targetverbose
- true
if messages are to be generatedrun
- true
if file is to be executedpropName
- properties file with items to installjavaParams
- java parametersMethod Detail |
---|
public boolean getVerbose()
public void setVerbose(boolean f)
f
- valuepublic boolean getRunMode()
public void setRunMode(boolean f)
f
- valuepublic boolean getExpand()
public void setExpand(boolean f)
f
- valuepublic String getPropFilename()
public void setPropFilename(String name)
name
- public String getJavaParams()
public void setJavaParams(String p)
p
- valueprotected void print(String s)
protected void println(String s)
protected void println()
public String install() throws IOException
IOException
- Thrown if a JAR file access error occurspublic void installFile(String fileUrl, String targetPath, boolean doExpand, boolean doRun) throws IOException
fileUrl
- The file/zip/jar filetargetPath
- root of directory or file to install intodoExpand
- doRun
-
IOException
- Thrown if a JAR file access error occurspublic void installClass(URLConnection conn, String target, boolean doExpand, boolean doRun) throws IOException
IOException
protected void runTarget(String target, boolean isJar) throws IOException
IOException
public void installJar(URLConnection conn, String target, boolean doExpand, boolean doRun) throws IOException
IOException
public void installZip(URLConnection conn, String target, boolean doExpand, boolean doRun) throws IOException
IOException
public void installGZip(URLConnection conn, String target, boolean doExpand, boolean doRun) throws IOException
IOException
protected void copyEntry(String target, ZipInputStream zis, ZipEntry ze) throws IOException
IOException
public void copyStream(URLConnection conn, String target) throws IOException
IOException
protected void pumpGZip(String target, GZIPInputStream zis) throws IOException
IOException
protected int loadBytes(byte[] buf, GZIPInputStream zis) throws IOException
IOException
protected boolean isEmptyBlock(byte[] buf, int index)
protected char extractChar(byte[] buf, int index) throws IOException
IOException
protected int extractInt(byte[] buf, int index, int length) throws IOException
IOException
protected long extractLong(byte[] buf, int index, int length) throws IOException
IOException
protected String extractString(byte[] buf, int index, int length) throws IOException
IOException
protected String getFile(String name)
protected String removeFile(String name)
protected String removeExtension(String name)
protected String extraceFile(String name)
protected String getExtension(String name)
protected void prepDirs(String name)
protected void prepDirs(String name, boolean includeLast)
protected void printUsage()
protected static void printHelp()
public static void main(String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |