public class Utils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.io.IOException |
REMOTELY_CLOSED |
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
copy(java.io.File src,
java.io.File dest)
Copy the specified file or directory to the destination.
|
static java.net.URLClassLoader |
createURLClassLoader(java.lang.String dirPath) |
static boolean |
deleteDir(java.io.File dir)
Delete the specified directory, including all of its contents and
subdirectories recursively.
|
protected static void |
expand(java.io.InputStream input,
java.io.File docBase,
java.lang.String name)
Expand the specified input stream into the specified directory, creating
a file named from the specified relative path.
|
static java.lang.String |
expand(java.net.URL jar)
Expand the jar file found at the specified URL into an unpacked
directory structure, and return the absolute pathname to the expanded
directory.
|
static java.lang.String |
expand(java.net.URL jar,
java.lang.String workFolder)
Expand the jar file found at the specified URL into an unpacked
directory structure, and return the absolute pathname to the expanded
directory.
|
static java.lang.String |
expand(java.net.URL jar,
java.lang.String pathname,
java.lang.String dirname)
Expand the jar file found at the specified URL into an unpacked
directory structure, and return the absolute pathname to the expanded
directory.
|
static java.lang.String |
id(io.netty.channel.Channel channel) |
static java.io.IOException |
ioExceptionForChannel(io.netty.channel.Channel channel,
java.lang.String uuid) |
public static final java.io.IOException ioExceptionForChannel(io.netty.channel.Channel channel,
java.lang.String uuid)
public static final java.net.URLClassLoader createURLClassLoader(java.lang.String dirPath)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String expand(java.net.URL jar)
throws java.io.IOException
jar - URL of the web application archive to be expanded
(must start with "jar:")File.getAbsolutePath() of location where to find expanded jar.java.lang.IllegalArgumentException - if this is not a "jar:" URLjava.io.IOException - if an input/output error was encountered
during expansionpublic static java.lang.String expand(java.net.URL jar,
java.lang.String workFolder)
throws java.io.IOException
jar - URL of the web application archive to be expanded
(must start with "jar:")workFolder - the folder where the file will be expandedFile.getAbsolutePath() of location where to find expanded jar.java.lang.IllegalArgumentException - if this is not a "jar:" URLjava.io.IOException - if an input/output error was encountered
during expansionpublic static java.lang.String expand(java.net.URL jar,
java.lang.String pathname,
java.lang.String dirname)
throws java.io.IOException
jar - URL of the web application archive to be expanded
(must start with "jar:")pathname - Context path name for web applicationFile.getAbsolutePath() of location where to find expanded jar.java.lang.IllegalArgumentException - if this is not a "jar:" URLjava.io.IOException - if an input/output error was encountered
during expansionprotected static void expand(java.io.InputStream input,
java.io.File docBase,
java.lang.String name)
throws java.io.IOException
input - InputStream to be copieddocBase - Document base directory into which we are expandingname - Relative pathname of the file to be createdjava.io.IOException - if an input/output error occurspublic static boolean deleteDir(java.io.File dir)
dir - File object representing the directory to be deletedpublic static boolean copy(java.io.File src,
java.io.File dest)
src - File object representing the sourcedest - File object representing the destinationpublic static final java.lang.String id(io.netty.channel.Channel channel)
Copyright © 2018. All Rights Reserved.