public class SecureFileStore extends FileStore
handler, HEADER_LENGTH, name
Constructor and Description |
---|
SecureFileStore(DataHandler handler,
String name,
String mode,
String cipher,
byte[] key,
int keyIterations) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
generateSalt()
Generate the random salt bytes if required.
|
protected void |
initKey(byte[] salt)
Initialize the key using the given salt.
|
void |
readFully(byte[] b,
int off,
int len)
Read a number of bytes.
|
protected void |
readFullyDirect(byte[] b,
int off,
int len)
Read a number of bytes without decrypting.
|
void |
seek(long x)
Go to the specified file location.
|
void |
write(byte[] b,
int off,
int len)
Write a number of bytes.
|
protected void |
writeDirect(byte[] b,
int off,
int len)
Write a number of bytes without encrypting.
|
autoDelete, close, closeAndDeleteSilently, closeFile, closeSilently, getFilePointer, init, isTextMode, length, open, open, open, openFile, releaseLock, setCheckedWriting, setLength, stopAutoDelete, sync, tryLock
public SecureFileStore(DataHandler handler, String name, String mode, String cipher, byte[] key, int keyIterations)
protected byte[] generateSalt()
FileStore
generateSalt
in class FileStore
protected void initKey(byte[] salt)
FileStore
protected void writeDirect(byte[] b, int off, int len)
FileStore
writeDirect
in class FileStore
b
- the source bufferoff
- the offsetlen
- the number of bytes to writepublic void write(byte[] b, int off, int len)
FileStore
protected void readFullyDirect(byte[] b, int off, int len)
FileStore
readFullyDirect
in class FileStore
b
- the target bufferoff
- the offsetlen
- the number of bytes to readpublic void readFully(byte[] b, int off, int len)
FileStore
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.