|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.panter.li.bi.asn.ber.AsnBerInputStream
public class AsnBerInputStream
An InputStream that provides special utility functionality to decode an ASN.1 BER-encoded message.
Constructor Summary | |
---|---|
AsnBerInputStream(InputStream input)
Creates a new instance which will read from the given input stream. |
Method Summary | |
---|---|
void |
close()
Irrevocably closes this instance. |
long |
getCurrentPosition()
Gets the current position in the stream. |
int |
getMaximumPrimitiveValueSize()
|
boolean |
hasMoreDataAvailable()
Determines whether more data is available to be read from this instance. |
boolean |
isClosed()
Determines whether this instance has been closed. |
boolean |
isDecodeToFloatIfPossible()
|
void |
mark(int readLimit)
|
AsnTag |
readNextTag()
|
AsnBerTagLength |
readTagLength()
|
void |
readTagValue(byte[] tagValue)
Read the tag value data from the underlying stream. |
void |
readTagValue(byte[] tagValue,
int offset,
int length)
Read the tag value data from the underlying stream. |
void |
readValue(AsnSimpleValueBase value,
long valueLength)
|
void |
reset()
|
void |
setDecodeToFloatIfPossible(boolean decodeToFloatIfPossible)
|
void |
setMaximumPrimitiveValueSize(int maximumPrimitiveValueSize)
|
void |
skipData(long numberOfBytesToSkip)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsnBerInputStream(InputStream input)
input
- the stream to read from. may not be null.Method Detail |
---|
public final int getMaximumPrimitiveValueSize()
public final void setMaximumPrimitiveValueSize(int maximumPrimitiveValueSize)
public final boolean isDecodeToFloatIfPossible()
public final void setDecodeToFloatIfPossible(boolean decodeToFloatIfPossible)
public final boolean hasMoreDataAvailable() throws IOException
IOException
- in case of an io errorpublic final void mark(int readLimit) throws IOException
IOException
public final void reset() throws IOException
IOException
public final AsnTag readNextTag() throws IOException, AsnBerException
IOException
AsnBerException
public final AsnBerTagLength readTagLength() throws IOException, AsnBerException
IOException
AsnBerException
public final void readValue(AsnSimpleValueBase value, long valueLength) throws IOException, AsnException
IOException
AsnException
public final void readTagValue(byte[] tagValue) throws IOException, AsnBerException
tagValue.length
tagValue
- the buffer into which the data is read
AsnBerException
- in case not enough data can be read
IOException
- in case of an io error
NullPointerException
- in case buffer is nullpublic final void readTagValue(byte[] tagValue, int offset, int length) throws IOException, AsnBerException
length
tagValue
- the buffer into which the data is readoffset
- the start offset in the array at which the data is writtenlength
- the number of bytes to read (obtained via readTagLength)
AsnBerException
- in case not enough data can be read
IOException
- in case of an io error
NullPointerException
- in case buffer is null
IllegalArgumentException
- in case of a negative length
ArrayIndexOutOfBoundsException
- in case offset..offset+length-1 exceeds the boundaries of the arraypublic void skipData(long numberOfBytesToSkip) throws IOException, AsnBerException
IOException
AsnBerException
public final long getCurrentPosition()
public final boolean isClosed()
public final void close() throws IOException
IOException
- in case of an io error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |