Class EncryptionStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.pgpainless.encryption_signing.EncryptionStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public final class EncryptionStream extends OutputStream
OutputStream that produces an OpenPGP message. The message can be encrypted, signed, or both, depending on its configuration. This class is based upon Jens Neuhalfen's Bouncy-GPG PGPEncryptingStream.- See Also:
- Source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()EncryptionResultgetResult()booleanisClosed()voidprepareInputEncoding()voidprepareSigningStream()voidwrite(byte[] buffer)voidwrite(byte[] buffer, int off, int len)voidwrite(int data)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
prepareSigningStream
public void prepareSigningStream()
-
prepareInputEncoding
public void prepareInputEncoding()
-
write
public void write(int data) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(@Nonnull byte[] buffer) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(@Nonnull byte[] buffer, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
getResult
public EncryptionResult getResult()
-
isClosed
public boolean isClosed()
-
-