public class OpenPGPMessageOutputStream
extends java.io.OutputStream
OutputStream tailored to creating OpenPGP messages.
Since not all OpenPGP-related OutputStreams forward close() calls, we need to keep track of nested streams
and close them in order.
This stream can create OpenPGP messages following the following EBNF (which is a subset of the EBNF defined in RFC9580):
| Modifier and Type | Class and Description |
|---|---|
static interface |
OpenPGPMessageOutputStream.OutputStreamFactory
Factory class for wrapping output streams.
|
static interface |
OpenPGPMessageOutputStream.PaddingPacketFactory
Factory interface for creating PGPPadding objects.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int i) |
public void write(int i)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException