public class BCPGInputStream extends java.io.InputStream implements PacketTags
AEAD_ENC_DATA, COMPRESSED_DATA, EXPERIMENTAL_1, EXPERIMENTAL_2, EXPERIMENTAL_3, EXPERIMENTAL_4, LITERAL_DATA, MARKER, MOD_DETECTION_CODE, ONE_PASS_SIGNATURE, PADDING, PUBLIC_KEY, PUBLIC_KEY_ENC_SESSION, PUBLIC_SUBKEY, RESERVED, SECRET_KEY, SECRET_SUBKEY, SIGNATURE, SYM_ENC_INTEGRITY_PRO, SYMMETRIC_KEY_ENC, SYMMETRIC_KEY_ENC_SESSION, TRUST, USER_ATTRIBUTE, USER_ID| Constructor and Description |
|---|
BCPGInputStream(java.io.InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int readLimit) |
boolean |
markSupported() |
int |
nextPacketTag()
Obtains the tag of the next packet in the stream.
|
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
byte[] |
readAll() |
void |
readFully(byte[] buf) |
void |
readFully(byte[] buf,
int off,
int len) |
Packet |
readPacket()
Reads the next packet from the stream.
|
void |
reset() |
int |
skipMarkerAndPaddingPackets()
skip any marker and padding packets found in the stream.
|
int |
skipMarkerPackets()
Deprecated.
use skipMarkerAndPaddingPackets
|
static BCPGInputStream |
wrap(java.io.InputStream in)
If the argument is a
BCPGInputStream, return it. |
public static BCPGInputStream wrap(java.io.InputStream in)
BCPGInputStream, return it.
Otherwise wrap it in a BCPGInputStream and then return the result.in - input streampublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int readLimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void readFully(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic byte[] readAll()
throws java.io.IOException
java.io.IOExceptionpublic void readFully(byte[] buf)
throws java.io.IOException
java.io.IOExceptionpublic int nextPacketTag()
throws java.io.IOException
tag number.java.io.IOException - if an error occurs reading the tag from the stream.public Packet readPacket() throws java.io.IOException
java.io.IOExceptionpublic int skipMarkerPackets()
throws java.io.IOException
java.io.IOException - on a parsing issue.public int skipMarkerAndPaddingPackets()
throws java.io.IOException
java.io.IOException - on a parsing issue.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException