public class FileEncrypt extends FileBaseDefault
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCK_SIZE
The block size.
|
| Constructor and Description |
|---|
FileEncrypt(java.lang.String name,
byte[] encryptionKey,
java.nio.channels.FileChannel base) |
FileEncrypt(java.lang.String name,
FileEncrypt source,
java.nio.channels.FileChannel base) |
| Modifier and Type | Method and Description |
|---|---|
void |
force(boolean metaData) |
protected void |
implCloseChannel() |
protected void |
implTruncate(long newSize)
The truncate implementation.
|
int |
read(java.nio.ByteBuffer dst,
long position) |
long |
size() |
java.lang.String |
toString() |
java.nio.channels.FileLock |
tryLock(long position,
long size,
boolean shared) |
int |
write(java.nio.ByteBuffer src,
long position) |
position, position, read, truncate, writelock, map, read, transferFrom, transferTo, writebegin, close, end, isOpenpublic static final int BLOCK_SIZE
public FileEncrypt(java.lang.String name,
byte[] encryptionKey,
java.nio.channels.FileChannel base)
public FileEncrypt(java.lang.String name,
FileEncrypt source,
java.nio.channels.FileChannel base)
protected void implCloseChannel()
throws java.io.IOException
implCloseChannel in class FileBasejava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst,
long position)
throws java.io.IOException
public int write(java.nio.ByteBuffer src,
long position)
throws java.io.IOException
public long size()
throws java.io.IOException
size in interface java.nio.channels.SeekableByteChannelsize in class java.nio.channels.FileChanneljava.io.IOExceptionprotected void implTruncate(long newSize)
throws java.io.IOException
FileBaseDefaultimplTruncate in class FileBaseDefaultnewSize - the new sizejava.io.IOException - on failurepublic void force(boolean metaData)
throws java.io.IOException
public java.nio.channels.FileLock tryLock(long position,
long size,
boolean shared)
throws java.io.IOException
public java.lang.String toString()
toString in class java.lang.Object