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 String |
getPrefix() |
String |
getScheme()
Get the scheme (prefix) for this file provider.
|
InputStream |
newInputStream()
Create an input stream to read from the file.
|
OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
FileChannel |
open(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(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, wrap
get, getName, getNextTempFileNamePart, register, toString, unregister
public static void register()
public FileChannel open(String mode) throws IOException
FilePath
open
in class FilePathWrapper
mode
- the access mode. Supported are r, rw, rws, rwdIOException
public String getScheme()
FilePath
java.nio.file.spi.FileSystemProvider.getScheme
.protected String getPrefix()
getPrefix
in class FilePathWrapper
public FilePath unwrap(String fileName)
FilePathWrapper
unwrap
in class FilePathWrapper
fileName
- the path including the scheme prefixpublic long size()
FilePath
size
in class FilePathWrapper
public OutputStream newOutputStream(boolean append) throws IOException
FilePath
newOutputStream
in class FilePathWrapper
append
- if true, the file will grow, if false, the file will be
truncated firstIOException
public InputStream newInputStream() throws IOException
FilePath
newInputStream
in class FilePathWrapper
IOException
public static byte[] getPasswordBytes(char[] passwordChars)
passwordChars
- the password charactersCopyright © 2017 JBoss by Red Hat. All rights reserved.