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 void
close()
void
flush()
EncryptionResult
getResult()
boolean
isClosed()
void
prepareInputEncoding()
void
prepareSigningStream()
void
write(byte[] buffer)
void
write(byte[] buffer, int off, int len)
void
write(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:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(@Nonnull byte[] buffer) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(@Nonnull byte[] buffer, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
getResult
public EncryptionResult getResult()
-
isClosed
public boolean isClosed()
-
-