public static String getDisplayable(final SnmpValue snmpValue) { String decodedsnmpValue = snmpValue.toHexString(); try { if (snmpValue.isDisplayable()) decodedsnmpValue = snmpValue.toDisplayString(); } catch (Exception e) { LOG.debug("getDisplayable: got not displayable Value {}", e.getMessage()); } return decodedsnmpValue; }
public static Long getProtoCounter63Value(SnmpValue value) { Long retval = getProtoCounter63Value(value.getBytes()); if (retval != null && value.isDisplayable()) { LOG.info("Value '{}' is entirely displayable but still meets our other checks to be treated as a proto-Counter64. This may not be what you want.", new String(value.getBytes())); } return retval; }
private String getDisplayableCdpCacheAddress() { SnmpValue cdpCacheAddressValue = getValue(CDP_CACHE_ADDRESS); try { if (cdpCacheAddressValue.isDisplayable()) return cdpCacheAddressValue.toDisplayString(); } catch (Exception e) { return cdpCacheAddressValue.toHexString(); } return "not able to diplay"; }
if (mac.isDisplayable()) {
/** * <p>getCdpCacheDevicePort</p> * * @return a {@link java.lang.String} object. */ public String getCdpCacheDevicePort() { if (getValue(CDP_CACHE_DEVICE_PORT).isDisplayable()) return getValue(CDP_CACHE_DEVICE_PORT).toDisplayString(); return getValue(CDP_CACHE_DEVICE_PORT).toHexString(); }
/** * <p>getCdpCacheDeviceId</p> * * @return a {@link java.lang.String} object. */ public String getCdpCacheDeviceId() { if (getValue(CDP_CACHE_DEVICE_ID).isDisplayable()) return getValue(CDP_CACHE_DEVICE_ID).toDisplayString(); return getValue(CDP_CACHE_DEVICE_ID).toHexString(); }
public static String decodeLldpPortId(Integer lldpPortIdSubType,SnmpValue lldpportid) { if (lldpPortIdSubType == null) { if (lldpportid.isDisplayable()) return lldpportid.toDisplayString(); else case LLDP_PORTID_SUBTYPE_INTERFACENAME: case LLDP_PORTID_SUBTYPE_LOCAL: if (lldpportid.isDisplayable()) return lldpportid.toDisplayString(); else
boolean displayable = false; try { displayable = value.isDisplayable(); } catch (ArrayIndexOutOfBoundsException aioobe) {