public class FileUtils
extends java.lang.Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(java.io.File source,
java.io.File destination) |
static void |
copy(java.io.InputStream in,
java.io.OutputStream out) |
static void |
copy(java.lang.String source,
java.lang.String destination) |
static byte[] |
extractFileFromArchive(byte[] archiveBytes,
java.lang.String filePath)
Extracts a single file from an archive.
|
static byte[] |
extractFileFromArchive(java.io.File archiveFile,
java.lang.String filePath)
Extracts a single file from an archive.
|
static java.lang.String |
extractFileFromArchiveBase64(java.lang.String archiveBytesBase64,
java.lang.String filePath)
Extracts a single file from an archive.
|
static void |
protect(java.io.File file)
This will set readable/writable to false for everyone except the owner of the file.
|
public static void copy(java.lang.String source, java.lang.String destination) throws java.io.IOException
java.io.IOException
public static void copy(java.io.File source, java.io.File destination) throws java.io.IOException
java.io.IOException
public static void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static void protect(java.io.File file)
file
- public static java.lang.String extractFileFromArchiveBase64(java.lang.String archiveBytesBase64, java.lang.String filePath) throws java.io.IOException
archiveBytesBase64
- The bytes of the archive encoded as base64filePath
- The path in the archive of the file to extractjava.io.IOException
public static byte[] extractFileFromArchive(byte[] archiveBytes, java.lang.String filePath) throws java.io.IOException
archiveBytes
- The bytes of the archivefilePath
- The path in the archive of the file to extractjava.io.IOException
public static byte[] extractFileFromArchive(java.io.File archiveFile, java.lang.String filePath) throws java.io.IOException
archiveFile
- The archivefilePath
- The path in the archive of the file to extractjava.io.IOException