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.OutputStream
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException