|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.io.BlockIO
ewe.io.BlockOutputStream
A BlockOutputStream is used to write out a block of data that is received by a BlockInputStream as a single block.
You can also provide an Encryptor for the Stream in which case the receiving BlockInputStream must also have a matching Decryptor.
| Field Summary | |
protected OutputStream |
out
|
| Fields inherited from class ewe.io.BlockIO |
intBuff, isOutput, secureDocument |
| Constructor Summary | |
BlockOutputStream(OutputStream out)
Create a BlockOutputStream using the provided OutputStream for writing out data. |
|
| Method Summary | |
void |
changeEncryption()
This forces the output stream to change its encryption. |
void |
close()
Close this BlockOutputStream and the underlying OutputStream. |
void |
setDontUseCompression(boolean dontUseCompression)
This is used to set the dontUseCompression option for data encryption. |
void |
setEncryptor(DataProcessor encryptor)
Explicitly set the encryptor to use. |
void |
setEncryptor(String password)
Set the encryptor to be a new Encryptor using the specified password. |
void |
setKeys(EncryptionKey remotePublicKey,
EncryptionKey myPrivateKey)
Set the Public/Private keys. |
void |
writeBlock(byte[] source,
int offset,
int length)
Write out a block of data, encrypting it as necessary. |
void |
writeBlock(ByteArray data)
Write out a block of data. |
| Methods inherited from class ewe.io.BlockIO |
createSecureDocument, getSecureDocument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
protected OutputStream out
| Constructor Detail |
public BlockOutputStream(OutputStream out)
| Method Detail |
public void setDontUseCompression(boolean dontUseCompression)
public void setEncryptor(DataProcessor encryptor)
throws IOException
IOException
public void setEncryptor(String password)
throws IOException
IOException
public void changeEncryption()
throws IOException
IOException
public void writeBlock(ByteArray data)
throws IOException
IOException
public void writeBlock(byte[] source,
int offset,
int length)
throws IOException
IOException
public void close()
throws IOException
IOException - if an error occurs closing the underlying OutputStream.
public void setKeys(EncryptionKey remotePublicKey,
EncryptionKey myPrivateKey)
remotePublicKey - This is the public key of the
receiver and the symmetric key used to encrypt each block of data will be encrypted
using this key.myPrivateKey - if this is not null it will be used to sign data being transmitted.
If you do not want to sign outgoing data, you can leave this null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||