|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
EncryptedOutputStream
| Field Summary | |
private int |
blocksize
|
private byte[] |
buf
|
private static boolean |
DEBUG
|
private static int |
DEFAULT_BUFFER_SIZE
|
private int |
end
|
private Object |
key
|
private static int |
KEY_SIZE
|
private int |
pos
|
| Fields inherited from class java.io.FilterOutputStream |
out |
| Constructor Summary | |
EncryptedOutputStream(OutputStream out)
Create an EncryptedOutputStream with the default buffer size. |
|
EncryptedOutputStream(OutputStream out,
int bufsize)
Create an EncryptedOutputStream with a given buffer size. |
|
| Method Summary | |
void |
close()
Close the stream. |
void |
flush()
Flush the buffer. |
private Object |
readKey()
Read the key from the keyfile |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the byte array starting at off |
void |
write(int b)
Write a byte. |
void |
writeEncryptedBlock()
Write an encrypted block to the output stream. |
| Methods inherited from class java.io.FilterOutputStream |
write |
| 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 static final boolean DEBUG
private byte[] buf
private int pos
private int end
private int blocksize
private Object key
| Constructor Detail |
public EncryptedOutputStream(OutputStream out)
throws Exception
out - underlying output stream to encrypt.
public EncryptedOutputStream(OutputStream out,
int bufsize)
throws Exception
out - underlying output stream to encrypt.bufsize - the size of the internal buffer| Method Detail |
public void write(int b)
throws IOException
b - byte to write.
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
b - the dataoff - data offsetlen - number of bytes to write
IOException
public void writeEncryptedBlock()
throws IOException
IOException
public void flush()
throws IOException
IOException
private Object readKey()
throws Exception
Exception
public void close()
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||