Method Summary |
|
public static void | copy(InputStream in, OutputStream out) Fully transfers the given input stream to the given output stream. |
public static void | copy(File source, OutputStream target) Copies the contents of a file to the given output stream. |
public static void | copy(File source, File target) Copies one file to another. |
public static void | delete(File file) Deletes a file. |
public static String | getMd5(File file) Calculates the MD5 checksum for the given file.
Parameters: file - File for which the checksum should be calculated. |
public static int | getPermissions(File file) |
public static boolean | isEmpty(File file) Checks whether the given file is a directory.
Parameters: file - File to check for being a directory. |
public static boolean | isJarFile(File file) Checks whether the given file is a jar archive.
Parameters: file - File to check for being a jar archive. |
public static boolean | isSigned(File file) Checks whether the given file is a signed jar archive.
Parameters: file - File to check for being a signed jar archive. |
public static void | nativeUnzip(File file, File directory) |
public static boolean | pack(File source, File target) Packs the given jar archive using the pack200 utility.
Parameters: source - Jar archive to pack. Parameters: target - File which should become the packed jar archive. |
public static boolean | packInternally(File source, File target) |
public static String | post(String url, Map<String, Object> args) Sends an HTTP POST request to the given URL. |
public static CharSequence | read(InputStream in) Fully reads an input stream into a character sequence using the system's
default encoding.
Parameters: in - Input sream to read. |
public static void | setProject(Project project) Setter for the 'project' property. |
public static Results | sign(File file, String keystore, String alias, String password) Signs the given jar file using the data provided in the given keystore.
Parameters: file - Jar archive which will be signed. Parameters: keystore - Path to the keystore file. Parameters: alias - Keystore alias. Parameters: password - Keystore password. |
public static long | size(File file) Measures the size of a file. |
public static String | toAscii(String string) Converts the given string to its java-style ASCII equivalent, escaping
non ASCII characters with their \\uXXXX sequences.
Parameters: string - String to escape. |
public static boolean | unpack(File source, File target) Unpacks the given packed jar archive using the unpack200 utility.
Parameters: source - Packe jar archive to unpack. Parameters: target - File to which the unpacked archive should be saved. |
public static boolean | unpackInternally(File source, File target) |
public static void | unzip(File file, File directory) Unzips a zip archive to the specified directory. |
public static boolean | verify(File file) Verifies that the jar archive is correct. |
public static boolean | verifyJad(File file) Verifies that the if jar archive is placed next to jad, the jad file
contains correct jar size
Parameters: file - Jar archive to check. |
public static void | write(File file, CharSequence chars) Writes the given character sequence to the given file. |