Package org.snmp4j.smi
Class BitString
java.lang.Object
org.snmp4j.smi.AbstractVariable
org.snmp4j.smi.OctetString
org.snmp4j.smi.BitString
- All Implemented Interfaces:
 Serializable,Cloneable,Comparable<Variable>,BERSerializable,AssignableFromByteArray,AssignableFromString,Variable
The 
BitString class represents the obsolete SMI type
 BIT STRING which has been defined in RFC 1442 (an SNMPv2 draft) but
 which has been obsoleteted by RFC 1902 and RFC 2578. This type is
 provided for compatibility only and should not be used for new
 applications.- Since:
 - 1.7.4
 - Version:
 - 1.7.4
 - Author:
 - Frank Fock
 - See Also:
 
- 
Field Summary
Fields inherited from class org.snmp4j.smi.AbstractVariable
SMISYNTAXES_PROPERTIES - 
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.The BIT STRING type has been temporarily defined in RFC 1442 and obsoleted by RFC 2578. - 
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this variable.voiddecodeBER(BERInputStream inputStream) Decodes aVariablefrom anBERInputStream.voidencodeBER(OutputStream outputStream) Encodes aVariableto anOutputStream.intGets the ASN.1 syntax identifier value of this SNMP variable.Methods inherited from class org.snmp4j.smi.OctetString
append, append, append, append, clear, compareTo, equals, equalsValue, fromByteArray, fromHexString, fromHexString, fromHexStringPairs, fromString, fromString, fromSubIndex, get, getBERLength, getBERPayloadLength, getValue, hashCode, isPrintable, length, mask, set, setValue, setValue, split, startsWith, substring, toASCII, toByteArray, toHexString, toHexString, toInt, toLong, toString, toString, toString, toSubIndexMethods inherited from class org.snmp4j.smi.AbstractVariable
createFromBER, createFromSyntax, equal, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException 
- 
Constructor Details
- 
BitString
public BitString()Deprecated.The BIT STRING type has been temporarily defined in RFC 1442 and obsoleted by RFC 2578. Use OctetString (i.e. BITS syntax) instead.Creates a BIT STRING value. 
 - 
 - 
Method Details
- 
getSyntax
public int getSyntax()Description copied from class:AbstractVariableGets the ASN.1 syntax identifier value of this SNMP variable.- Specified by:
 getSyntaxin interfaceVariable- Overrides:
 getSyntaxin classOctetString- Returns:
 - an integer value less than 128 for regular SMI objects and a value greater or equal than 128 for exception values like noSuchObject, noSuchInstance, and endOfMibView.
 
 - 
encodeBER
Description copied from class:AbstractVariableEncodes aVariableto anOutputStream.- Specified by:
 encodeBERin interfaceBERSerializable- Overrides:
 encodeBERin classOctetString- Parameters:
 outputStream- anOutputStream.- Throws:
 IOException- if an error occurs while writing to the stream.
 - 
decodeBER
Description copied from class:AbstractVariableDecodes aVariablefrom anBERInputStream.- Specified by:
 decodeBERin interfaceBERSerializable- Overrides:
 decodeBERin classOctetString- Parameters:
 inputStream- anBERInputStreamcontaining a BER encoded byte stream.- Throws:
 IOException- if the stream could not be decoded by using BER rules.
 - 
clone
Description copied from interface:VariableClones this variable. Cloning can be used by the SNMP4J API to better support concurrency by creating a clone for internal processing. The content of this object is independent to the content of the clone. Thus, changes to the clone will have no effect to this object.- Specified by:
 clonein interfaceVariable- Overrides:
 clonein classOctetString- Returns:
 - a new instance of this 
Variablewith the same value. 
 
 -