public class FileEncrypt extends FileBaseDefault
FileChannel.MapMode| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BLOCK_SIZE
The block size.
|
| 构造器和说明 |
|---|
FileEncrypt(String name,
byte[] encryptionKey,
FileChannel base) |
FileEncrypt(String name,
FileEncrypt source,
FileChannel base) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
force(boolean metaData) |
protected void |
implCloseChannel() |
protected void |
implTruncate(long newSize)
The truncate implementation.
|
int |
read(ByteBuffer dst,
long position) |
long |
size() |
String |
toString() |
FileLock |
tryLock(long position,
long size,
boolean shared) |
int |
write(ByteBuffer src,
long position) |
lock, map, read, transferFrom, transferTo, writebegin, close, end, isOpenpublic static final int BLOCK_SIZE
public FileEncrypt(String name, byte[] encryptionKey, FileChannel base)
public FileEncrypt(String name, FileEncrypt source, FileChannel base)
protected void implCloseChannel()
throws IOException
implCloseChannel 在类中 FileBaseIOExceptionpublic int read(ByteBuffer dst, long position) throws IOException
read 在类中 FileBaseIOExceptionpublic int write(ByteBuffer src, long position) throws IOException
write 在类中 FileBaseIOExceptionpublic long size()
throws IOException
size 在接口中 SeekableByteChannelsize 在类中 FileChannelIOExceptionprotected void implTruncate(long newSize)
throws IOException
FileBaseDefaultimplTruncate 在类中 FileBaseDefaultnewSize - the new sizeIOException - on failurepublic void force(boolean metaData)
throws IOException
force 在类中 FileBaseIOExceptionpublic FileLock tryLock(long position, long size, boolean shared) throws IOException
tryLock 在类中 FileBaseIOExceptionCopyright © 2022. All rights reserved.