1 11 12 13 package com.sun.jmx.snmp; 14 15 16 17 26 27 public class SnmpOpaque extends SnmpString { 28 29 35 public SnmpOpaque(byte[] v) { 36 super(v) ; 37 } 38 39 43 public SnmpOpaque(Byte [] v) { 44 super(v) ; 45 } 46 47 51 public SnmpOpaque(String v) { 52 super(v) ; 53 } 54 55 62 public String toString() { 63 StringBuffer result = new StringBuffer () ; 64 for (int i = 0 ; i < value.length ; i++) { 65 byte b = value[i] ; 66 int n = (b >= 0) ? b : b + 256 ; 67 result.append(Character.forDigit(n / 16, 16)) ; 68 result.append(Character.forDigit(n % 16, 16)) ; 69 } 70 return result.toString() ; 71 } 72 73 77 final public String getTypeName() { 78 return name ; 79 } 80 81 86 final static String name = "Opaque" ; 87 } 88 | Popular Tags |