📄 package.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><title>org.snmp4j.smi</title><!--/*_############################################################################ _## _## SNMP4J _## _## Copyright 2003-2004 Frank Fock and Jochen Katz (SNMP4J.org) _## _## Licensed under the Apache License, Version 2.0 (the "License"); _## you may not use this file except in compliance with the License. _## You may obtain a copy of the License at _## _## http://www.apache.org/licenses/LICENSE-2.0 _## _## Unless required by applicable law or agreed to in writing, software _## distributed under the License is distributed on an "AS IS" BASIS, _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. _## See the License for the specific language governing permissions and _## limitations under the License. _## _##########################################################################*/--></head><body bgcolor="white">Provides classes for the representation of SMIv1/v2 data types (which alsoincludes some basic ASN.1 primitive data types).<p>The <code>org.snmp4j.smi</code> classes are capable of BER encoding anddecoding themself to/from a byte stream. In addition, the SMI data typeclasses provide convenient functions for manipulating their content.</p> <p>The <code>VariantVariable</code> is a special class that can be used in command responder applications to intercept access to a SMI value.</p> <h4>Variable Binding Examples</h4><pre>import org.snmp4j.smi.*;...VariableBinding vb = new VariableBinding(new OID("1.3.6.1.2.1.1.4.0"));vb.setValue(new OctetString("SNMP4J Text"));...vb = new VariableBinding();vb.setOid(new OID(new int[] { 1,3,6,1,2,1,1,2,0 }));...vb = new VariableBinding(vb.getOid(), new IpAddress("255.255.255.255"));...vb = new VariableBinding(vb.getOid(), new Gauge32(2^32-1));int syntax = vb.getSyntax();if (syntax != SMIConstants.SYNTAX_GAUGE32) { // never reached}else { long value = ((UnsignedInteger32)vb.getValue()).getValue(); System.out.println(vb.getOid() + " = " + value); // prints: 1.3.6.1.2.1.1.2.0 = 4294967295}...</pre><p> The following UML class diagram shows the most important classes of the <code>org.snmp4j.smi</code> package and their relationships (relationships to other packages are not shown):</p><img name="UML Class Diagram org.snmp4j.smi" src="doc-files/org_snmp4j_smi.gif"/></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -