public class FilePathEncrypt extends FilePathWrapper
| 限定符和类型 | 类和说明 |
|---|---|
static class |
FilePathEncrypt.FileEncrypt
An encrypted file with a read cache.
|
| 构造器和说明 |
|---|
FilePathEncrypt() |
| 限定符和类型 | 方法和说明 |
|---|---|
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, wrapget, getName, getNextTempFileNamePart, register, toString, unregisterpublic static void register()
public FileChannel open(String mode) throws IOException
FilePathopen 在类中 FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdIOExceptionpublic String getScheme()
FilePathjava.nio.file.spi.FileSystemProvider.getScheme.protected String getPrefix()
getPrefix 在类中 FilePathWrapperpublic FilePath unwrap(String fileName)
FilePathWrapperunwrap 在类中 FilePathWrapperfileName - the path including the scheme prefixpublic long size()
FilePathsize 在类中 FilePathWrapperpublic OutputStream newOutputStream(boolean append) throws IOException
FilePathnewOutputStream 在类中 FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstIOExceptionpublic InputStream newInputStream() throws IOException
FilePathnewInputStream 在类中 FilePathWrapperIOExceptionpublic static byte[] getPasswordBytes(char[] passwordChars)
passwordChars - the password charactersCopyright © 2017. All rights reserved.