KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > agent > SnmpEntryOid


1 /*
2  * @(#)file SnmpEntryOid.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.4
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  */

10 package com.sun.jmx.snmp.agent;
11
12 import com.sun.jmx.snmp.SnmpOid;
13
14 /**
15  * This class only adds a new constructor to SnmpOid...
16  *
17  **/

18 class SnmpEntryOid extends SnmpOid {
19     /**
20      * Constructs a new <CODE>SnmpOid</CODE> from the specified
21      * component array, starting at given position.
22      *
23      * @param oid The original OID array
24      * @param start The position at which to begin.
25      *
26      **/

27     public SnmpEntryOid(long[] oid, int start) {
28         final int subLength = oid.length - start;
29         final long[] subOid = new long[subLength];
30     java.lang.System.arraycopy(oid, start, subOid, 0, subLength) ;
31     components = subOid;
32     componentCount = subLength;
33     }
34 }
35
Popular Tags