|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.outbackinc.services.protocol.snmp.Asn1InputStream
The Asn1InputStream takes a byte buffer and decodes it based on standard ASN.1 syntax. This class is provided for implementers of future SNMPv3 security models, otherwise it should not be normally used in JSNMP applications.
SnmpConstants
,
Asn1Exception
Constructor Summary | |
Asn1InputStream(byte[] cbBuffer)
Constructor. |
Method Summary | |
int |
getPosition()
Get the current position in the Asn1InputStream. |
byte |
peekType()
Get the ASN.1 type at the current position in the Asn1InputStream, without advancing the current position in the Asn1InputStream. |
void |
readException()
Read a SnmpConstants.ASN_NOSUCHOBJECT, SnmpConstants.ASN_NOSUCHINSTANCE, or SnmpConstants.ASN_ENDOFMIBVIEW type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
java.math.BigInteger |
readInteger()
Read a SnmpConstants.ASN_INTEGER type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
byte[] |
readIPAddress()
Read a SnmpConstants.ASN_IPADDRESS type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
int |
readLength()
Get the ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
void |
readNull()
Read a SnmpConstants.ASN_NULL type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
byte[] |
readOctetString()
Read a SnmpConstants.ASN_OCTSTR type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
java.lang.String |
readOID()
Read a SnmpConstants.ASN_OID type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
byte[] |
readOpaque()
Read a SnmpConstants.ASN_OPAQUE type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
int |
readSequence()
Read the SnmpConstants.ASN_SEQUENCE type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
byte |
readType()
Get the ASN.1 type at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
java.lang.Long |
readUnsigned32Bit()
Read a SnmpConstants.ASN_COUNTER, SnmpConstants.ASN_GAUGE, SnmpConstants.ASN_TIMETICKS, or SnmpConstants.ASN_UINTEGER32 type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
java.math.BigInteger |
readUnsigned64Bit()
Read a SnmpConstants.ASN_COUNTER64 type and its ASN.1 length at the current position in the Asn1InputStream, advancing the current position in the Asn1InputStream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Asn1InputStream(byte[] cbBuffer)
cbBuffer
- ASN.1 encoded buffer.Method Detail |
public final int getPosition()
public final byte peekType() throws java.io.IOException
java.io.IOException
- if current position is past end of Asn1InputStreampublic final byte readType() throws java.io.IOException
java.io.IOException
- if current position advanced past end of Asn1InputStreampublic final int readLength() throws Asn1Exception, java.io.IOException
Asn1Exception
- if length is greater than 4 bytesjava.io.IOException
- if current position advanced past end of Asn1InputStreampublic final int readSequence() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_SEQUENCE typejava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final void readException() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_NOSUCHOBJECT, SnmpConstants.ASN_NOSUCHINSTANCE, and SnmpConstants.ASN_ENDOFMIBVIEWjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final void readNull() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_NULLjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final byte[] readIPAddress() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_IPADDRESSjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final byte[] readOpaque() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_OPAQUEjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final java.lang.Long readUnsigned32Bit() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_COUNTER, SnmpConstants.ASN_GAUGE, SnmpConstants.ASN_TIMETICKS, and SnmpConstants.ASN_UINTEGER32java.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final java.math.BigInteger readUnsigned64Bit() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_COUNTER64java.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final java.math.BigInteger readInteger() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_INTEGERjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final java.lang.String readOID() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_OIDjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
public final byte[] readOctetString() throws Asn1Exception, java.io.IOException
Asn1Exception
- if ASN.1 type != SnmpConstants.ASN_OCTSTRjava.io.IOException
- if current position advanced past end of Asn1InputStreamSnmpConstants
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Home Services Products Purchase Contact Us About Us Legal Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.