public class FilePathEncrypt extends FilePathWrapper
| Modifier and Type | Class and Description |
|---|---|
static class |
FilePathEncrypt.FileEncrypt
An encrypted file with a read cache.
|
| Constructor and Description |
|---|
FilePathEncrypt() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getPasswordBytes(char[] passwordChars)
Convert a char array to a byte array, in UTF-16 format.
|
protected java.lang.String |
getPrefix() |
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider.
|
java.io.InputStream |
newInputStream()
Create an input stream to read from the file.
|
java.io.OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
java.nio.channels.FileChannel |
open(java.lang.String mode)
Open a random access file object.
|
static void |
register()
Register this file system.
|
long |
size()
Get the size of a file in bytes
|
FilePath |
unwrap(java.lang.String fileName)
Get the base path for the given wrapped path.
|
canWrite, createDirectory, createFile, createTempFile, delete, exists, getBase, getParent, getPath, isAbsolute, isDirectory, lastModified, moveTo, newDirectoryStream, setReadOnly, toRealPath, unwrap, wrapget, getName, getNextTempFileNamePart, register, toString, unregisterpublic static void register()
public java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePathopen in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdjava.io.IOExceptionpublic java.lang.String getScheme()
FilePathjava.nio.file.spi.FileSystemProvider.getScheme.protected java.lang.String getPrefix()
getPrefix in class FilePathWrapperpublic FilePath unwrap(java.lang.String fileName)
FilePathWrapperunwrap in class FilePathWrapperfileName - the path including the scheme prefixpublic long size()
FilePathsize in class FilePathWrapperpublic java.io.OutputStream newOutputStream(boolean append)
throws java.io.IOException
FilePathnewOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstjava.io.IOExceptionpublic java.io.InputStream newInputStream()
throws java.io.IOException
FilePathnewInputStream in class FilePathWrapperjava.io.IOExceptionpublic static byte[] getPasswordBytes(char[] passwordChars)
passwordChars - the password characters