|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
EncryptedInputStream
| Field Summary | |
private int |
blocksize
|
private byte[] |
buf
|
private boolean |
DEBUG
|
private static int |
DEFAULT_BUFFER_SIZE
|
private int |
end
|
private boolean |
HIT_EOF
|
private Object |
key
|
private static int |
KEY_SIZE
|
private int |
pos
|
| Fields inherited from class java.io.FilterInputStream |
in |
| Fields inherited from class java.io.InputStream |
|
| Constructor Summary | |
EncryptedInputStream(InputStream input)
Creates an EncryptedInputStream with the default buffer size |
|
EncryptedInputStream(InputStream input,
int bufsize)
Create an EncryptedInputStream with the given input stream and buffer size |
|
| Method Summary | |
int |
available()
Return number of bytes available to read. |
void |
close()
|
private void |
ensureOpen()
Make sure the stream is still open |
private void |
fill()
Read from the underlying input stream and decrypt the data. |
boolean |
markSupported()
Return true if this stream supports mark and reset. |
int |
read()
Read the next byte of data from the input stream. |
int |
read(byte[] b,
int off,
int len)
Read up to b.length bytes of data into a byte array. |
private Object |
readKey()
Read the key from the keyfile |
| Methods inherited from class java.io.FilterInputStream |
mark, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int DEFAULT_BUFFER_SIZE
private static final int KEY_SIZE
private final boolean DEBUG
private boolean HIT_EOF
private byte[] buf
private int pos
private int end
private int blocksize
private Object key
| Constructor Detail |
public EncryptedInputStream(InputStream input)
throws Exception
input - Underlying input stream
public EncryptedInputStream(InputStream input,
int bufsize)
throws Exception
input - the underlying input streambufsize - the buffer size (in bytes)| Method Detail |
private void fill()
throws IOException
IOException
private Object readKey()
throws Exception
Exceptionpublic int available()
public int read()
throws IOException
IOException
public int read(byte[] b,
int off,
int len)
throws IOException
b - byte array buffer into which the data is read.
IOException
private void ensureOpen()
throws IOException
IOExceptionpublic boolean markSupported()
public void close()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||