Package org.snmp4j.security
Class TsmSecurityParameters
java.lang.Object
org.snmp4j.smi.AbstractVariable
org.snmp4j.smi.OctetString
org.snmp4j.security.TsmSecurityParameters
- All Implemented Interfaces:
 Serializable,Cloneable,Comparable<Variable>,BERSerializable,SecurityParameters,AssignableFromByteArray,AssignableFromString,Variable
SecurityParameters implementation for the TSM
 security model.- Since:
 - 2.0
 - Version:
 - 2.0
 - Author:
 - Frank Fock
 - See Also:
 
- 
Field Summary
Fields inherited from class org.snmp4j.smi.AbstractVariable
SMISYNTAXES_PROPERTIES - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiddecodeBER(BERInputStream inputStream) Decodes aVariablefrom anBERInputStream.intgetBERMaxLength(int securityLevel) Gets the maximum length of the BER encoded representation of thisSecurityParametersinstance.intGets the position of theScopedPDU.intGets the byte position of the first byte (counted from zero) of the security parameters in the whole message.voidsetSecurityParametersPosition(int pos) Sets the position of the first byte (counted from zero) of the security parameters in the whole SNMP message.Methods inherited from class org.snmp4j.smi.OctetString
append, append, append, append, clear, clone, compareTo, encodeBER, equals, equalsValue, fromByteArray, fromHexString, fromHexString, fromHexStringPairs, fromString, fromString, fromSubIndex, get, getBERLength, getBERPayloadLength, getSyntax, 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, isExceptionMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.snmp4j.asn1.BERSerializable
encodeBER, getBERLength, getBERPayloadLength 
- 
Constructor Details
- 
TsmSecurityParameters
public TsmSecurityParameters() 
 - 
 - 
Method Details
- 
getSecurityParametersPosition
public int getSecurityParametersPosition()Description copied from interface:SecurityParametersGets the byte position of the first byte (counted from zero) of the security parameters in the whole message.- Specified by:
 getSecurityParametersPositionin interfaceSecurityParameters- Returns:
 - the position of the first byte (counted from zero) of the security parameters in the whole SNMP message. -1 is returned, when the position is unknown (not set).
 
 - 
setSecurityParametersPosition
public void setSecurityParametersPosition(int pos) Description copied from interface:SecurityParametersSets the position of the first byte (counted from zero) of the security parameters in the whole SNMP message.- Specified by:
 setSecurityParametersPositionin interfaceSecurityParameters- Parameters:
 pos- an integer value greater or equal than zero.
 - 
getBERMaxLength
public int getBERMaxLength(int securityLevel) Description copied from interface:SecurityParametersGets the maximum length of the BER encoded representation of thisSecurityParametersinstance.- Specified by:
 getBERMaxLengthin interfaceSecurityParameters- Parameters:
 securityLevel- the security level to be used.- Returns:
 - the maximum BER encoded length in bytes.
 
 - 
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.
 - 
getScopedPduPosition
public int getScopedPduPosition()Gets the position of theScopedPDU.- Returns:
 - the start position in the 
BERInputStream. 
 
 -