Active Virtual Network Management Prediction (AVNMP) Classes

snmp
Class AsnSequence

java.lang.Object
  |
  +--snmp.AsnObject
        |
        +--snmp.AsnSequence
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AsnPduSequence

public class AsnSequence
extends AsnObject
implements java.io.Serializable

ASN.1 Sequence class

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
 byte type
          Sequence type
 
Fields inherited from class snmp.AsnObject
CONS_SEQ, GET_REQ_MSG, GET_RSP_MSG, GETNEXT_REQ_MSG, pdu_type, SET_REQ_MSG, SNMP_ERR_BADVALUE, SNMP_ERR_GENERR, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, SNMP_ERR_READONLY, SNMP_ERR_TOOBIG, SNMP_VERSION_1, TRP_REQ_MSG
 
Constructor Summary
AsnSequence()
          Constructors
AsnSequence(byte oddtype)
          Begin building an ASN Sequence object of the given type.
AsnSequence(java.io.InputStream in)
          Begin reading an ASN Sequence from the input stream.
 
Method Summary
 AsnObject add(AsnObject child)
          Add a child to the sequence
 AsnObject findPdu()
          Find a PduSequence Object and return it.
 AsnObject getObj(int offset)
          Return an object at a given offset in the sequence.
 int size()
          Get size of children
 void write(java.io.OutputStream out)
          Write the sequence to the output stream.
 
Methods inherited from class snmp.AsnObject
AsnBuildHeader, AsnMakeMe, AsnReadHeader, LengthBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public byte type
Sequence type
Constructor Detail

AsnSequence

public AsnSequence()
Constructors

AsnSequence

public AsnSequence(byte oddtype)
Begin building an ASN Sequence object of the given type.
Parameters:
oddtype - The sequence type.
See Also:
Vector

AsnSequence

public AsnSequence(java.io.InputStream in)
            throws java.io.IOException
Begin reading an ASN Sequence from the input stream.
Parameters:
in - The input stream.
Method Detail

add

public AsnObject add(AsnObject child)
Add a child to the sequence
Overrides:
add in class AsnObject
Parameters:
child - Child Object to add to the sequence
Returns:
The input child object.

size

public int size()
Get size of children
Overrides:
size in class AsnObject
Returns:
the number of children elements

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Write the sequence to the output stream.
Overrides:
write in class AsnObject
Parameters:
out - Output stream

findPdu

public AsnObject findPdu()
Find a PduSequence Object and return it. Recursively look for a pduSequence object
Overrides:
findPdu in class AsnObject
Returns:
The PduSequence object.

getObj

public AsnObject getObj(int offset)
Return an object at a given offset in the sequence.
Parameters:
offset - Offset of the object in the sequence to return.
Returns:
The object at the given offset.

Active Virtual Network Management Prediction (AVNMP) Classes