|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
rice.p2p.util.EncryptedOutputStream
public class EncryptedOutputStream
| Field Summary | |
|---|---|
protected byte[] |
buffer
|
int |
BUFFER_SIZE
|
protected int |
bufferLength
|
protected byte[] |
key
|
protected PublicKey |
publicKey
|
protected DataOutputStream |
stream
|
| Constructor Summary | |
|---|---|
EncryptedOutputStream(PublicKey publicKey,
OutputStream stream,
int bufferSize)
Builds an encrypted outputstream given a public key to encrypt thing under |
|
| Method Summary | |
|---|---|
void |
close()
Closes this output stream and releases any system resources associated with this stream. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
void |
write(byte[] b,
int off,
int len)
Writes the given bytes to the output |
void |
write(int b)
Writes the specified byte to this output stream. |
protected void |
writeBuffer()
Internal method which writes out the buffered data |
| Methods inherited from class java.io.OutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int BUFFER_SIZE
protected PublicKey publicKey
protected byte[] key
protected DataOutputStream stream
protected byte[] buffer
protected int bufferLength
| Constructor Detail |
|---|
public EncryptedOutputStream(PublicKey publicKey,
OutputStream stream,
int bufferSize)
throws IOException
key - The keystream - The underlying stream
IOException| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamb - the byte
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
IOException
protected void writeBuffer()
throws IOException
IOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||