|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
oracle.security.crypto.asn1.ASN1ConstructedInputStream
public class ASN1ConstructedInputStream
A stream for reading one ASN.1 constructed encoding. Allows one-byte lookahead.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
ASN1ConstructedInputStream(java.io.InputStream is) Creates a new ASN1ConstructedInputStream which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding. |
|
ASN1ConstructedInputStream(java.io.InputStream is, ASN1Header header) Creates a new ASN1ConstructedInputStream which will read from the specified input stream, which must be positioned just before the contents octets of an ASN.1 encoding. |
|
ASN1ConstructedInputStream(java.io.InputStream is, int tag) Creates a new ASN1ConstructedInputStream which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding. |
|
ASN1ConstructedInputStream(java.io.InputStream is, int tag, int tagClass) Creates a new ASN1ConstructedInputStream which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding. |
Method Summary | |
---|---|
int |
available() |
int |
getCurrentIDByte() Returns the current tag ID (tag class, tag type...) |
int |
getCurrentTag() Returns the current tag. |
boolean |
hasMoreData() Returns true if the ASN1Constructed contained in this stream has not yet been completely read, otherwise false . |
boolean |
markSupported() Always returns false . |
int |
read() Reads one byte. |
int |
read(byte[] b, int off, int len) |
void |
setCurrentTag(int tag) Sets the current tag (and the current tag class to UNIVERSAL). |
void |
terminate() Invoking this method signals that all input from this constructed object has been read. |
void |
terminate(boolean skipRemaining) Invoking this method signals that all input from this constructed object has been read. |
Methods inherited from class java.io.FilterInputStream |
---|
close, mark, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASN1ConstructedInputStream(java.io.InputStream is) throws java.io.IOException
ASN1ConstructedInputStream
which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding.
The encoding must have the context-specific tag class and the constructed bit set, otherwise an ASN.1 format exception is thrown.
When this constructor returns, the underlying input stream will be positioned just before the contents octets of the encoding.
is
- the underlying input stream, positioned just before the initial (identifier) octets of an ASN.1 encodingASN1FormatException
- if the wrong tag or tag class is encountered, or the encoding being read is not a constructed encodingjava.io.IOException
public ASN1ConstructedInputStream(java.io.InputStream is, int tag) throws java.io.IOException
ASN1ConstructedInputStream
which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding.
The encoding must have the context-specific tag class and the specified tag value, otherwise an ASN.1 format exception is thrown.
When this constructor returns, the underlying input stream will be positioned just before the contents octets of the encoding.
is
- the underlying input stream, positioned just before the initial (identifier) octets of an ASN.1 encodingtag
- the expected tagASN1FormatException
- if the wrong tag or tag class is encountered, or the encoding being read is not a constructed encodingjava.io.IOException
public ASN1ConstructedInputStream(java.io.InputStream is, int tag, int tagClass) throws java.io.IOException
ASN1ConstructedInputStream
which will read from the specified input stream, which must be positioned just before the identifier octets of an ASN.1 encoding.
The encoding must have the specified tag and tag class, otherwise an ASN.1 format exception is thrown.
When this constructor returns, the underlying input stream will be positioned just before the contents octets of the encoding.
is
- the underlying input stream, positioned just before the initial (identifier) octets of an ASN.1 encodingtag
- the expected tagASN1FormatException
- if the wrong tag or tag class is encountered, or the encoding being read is not a constructed encodingjava.io.IOException
public ASN1ConstructedInputStream(java.io.InputStream is, ASN1Header header)
ASN1ConstructedInputStream
which will read from the specified input stream, which must be positioned just before the contents octets of an ASN.1 encoding.
Unlike the other constructors of this class, this constructor does not reader the header from the underlying input stream; instead the header is specified as a parameter.
Method Detail |
---|
public int read() throws java.io.IOException
If end of stream is encountered, this method does not return -1; instead it throws an ASN1FormatException
.
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
false
.markSupported
in class java.io.FilterInputStream
public boolean hasMoreData() throws java.io.IOException
true
if the ASN1Constructed
contained in this stream has not yet been completely read, otherwise false
.java.io.IOException
public void terminate(boolean skipRemaining) throws java.io.IOException
If the position of this stream is not at the end of the contents octets, then the skipRemaining
parameter must be true
.
For an indefinite-length encoding, causes any end-of-contents bytes to be read.
After calling this method, is an error to invoke any other method on this object except close()
.
It is an error to invoke this method if the pushback buffer is not empty.
skipRemaining
- If the position of this stream is not at the end of the contents octets, then this must be true
.java.io.IOException
public void terminate() throws java.io.IOException
For an indefinite-length encoding, causes any end-of-contents bytes to be read.
After calling this method, is an error to invoke any other method on this object except close()
.
It is an error to invoke this method if the pushback buffer is not empty.
java.io.IOException
public int getCurrentIDByte() throws java.io.IOException
java.io.IOException
public int getCurrentTag() throws java.io.IOException
java.io.IOException
public void setCurrentTag(int tag) throws java.io.IOException
tag
- the new tag value (must be in the range 0..30)java.io.IOException
|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |