org.snmp4j.smi.OID.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中org.snmp4j.smi.OID.setValue()方法的一些代码示例,展示了OID.setValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OID.setValue()方法的具体详情如下:
包路径:org.snmp4j.smi.OID
类名称:OID
方法名:setValue

OID.setValue介绍

[英]Sets the value from an array of integer values.
[中]设置整数值数组中的值。

代码示例

代码示例来源:origin: org.snmp4j/snmp4j

/**
 * Constructs an {@code OID} from an array of integer values.
 *
 * @param rawOID an array of {@code int} values. The array
 *               is copied. Later changes to {@code rawOID} will therefore not
 *               affect the OID's value.
 * @param offset the zero based offset into the {@code rawOID} that points to the
 *               first sub-identifier of the new OID.
 * @param length the length of the new OID, where {@code offset + length} must be
 *               less or equal the length of {@code rawOID}. Otherwise an
 *               {@code IndexOutOfBoundsException} is thrown.
 */
public OID(int[] rawOID, int offset, int length) {
  setValue(rawOID, offset, length);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

/**
 * Constructs an {@code OID} from an array of integer values.
 * @param rawOID
 *    an array of {@code int} values. The array
 *    is copied. Later changes to {@code rawOID} will therefore not
 *    affect the OID's value.
 * @param offset
 *    the zero based offset into the {@code rawOID} that points to the
 *    first sub-identifier of the new OID.
 * @param length
 *    the length of the new OID, where {@code offset + length} must be
 *    less or equal the length of {@code rawOID}. Otherwise an
 *    {@code IndexOutOfBoundsException} is thrown.
 */
public OID(int[] rawOID, int offset, int length) {
 setValue(rawOID, offset, length);
}

代码示例来源:origin: org.kaazing/snmp4j

/**
 * Constructs an <code>OID</code> from an array of integer values.
 * @param rawOID
 *    an array of <code>int</code> values. The array
 *    is copied. Later changes to <code>rawOID</code> will therefore not
 *    affect the OID's value.
 * @param offset
 *    the zero based offset into the <code>rawOID</code> that points to the
 *    first sub-identifier of the new OID.
 * @param length
 *    the length of the new OID, where <code>offset + length</code> must be
 *    less or equal the length of <code>rawOID</code>. Otherwise an
 *    <code>IndexOutOfBoundsException</code> is thrown.
 */
public OID(int[] rawOID, int offset, int length) {
 setValue(rawOID, offset, length);
}

代码示例来源:origin: org.snmp4j/snmp4j-agent

public void setSysOID(OID sysOID) {
  this.sysOID.setValue(sysOID.getValue());
}

代码示例来源:origin: org.kaazing/snmp4j-agent

public void setSysOID(OID sysOID) {
 this.sysOID.setValue(sysOID.getValue());
}

代码示例来源:origin: org.kaazing/snmp4j

public final void fromSubIndex(OID subIndex, boolean impliedLength) {
 int offset = 1;
 if (impliedLength) {
  offset = 0;
 }
 setValue(subIndex.getValue(), offset, subIndex.size()-offset);
}

代码示例来源:origin: org.snmp4j/snmp4j

public final void fromSubIndex(OID subIndex, boolean impliedLength) {
  int offset = 1;
  if (impliedLength) {
    offset = 0;
  }
  setValue(subIndex.getValue(), offset, subIndex.size() - offset);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

public final void fromSubIndex(OID subIndex, boolean impliedLength) {
 int offset = 1;
 if (impliedLength) {
  offset = 0;
 }
 setValue(subIndex.getValue(), offset, subIndex.size()-offset);
}

代码示例来源:origin: org.kaazing/snmp4j

public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
 BER.MutableByte type = new BER.MutableByte();
 int[] v = BER.decodeOID(inputStream, type);
 if (type.getValue() != BER.OID) {
  throw new IOException("Wrong type encountered when decoding OID: "+
             type.getValue());
 }
 setValue(v);
}

代码示例来源:origin: org.snmp4j/snmp4j

public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
  BER.MutableByte type = new BER.MutableByte();
  int[] v = BER.decodeOID(inputStream, type);
  if (type.getValue() != BER.OID) {
    throw new IOException("Wrong type encountered when decoding OID: " +
        type.getValue());
  }
  setValue(v);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
 BER.MutableByte type = new BER.MutableByte();
 int[] v = BER.decodeOID(inputStream, type);
 if (type.getValue() != BER.OID) {
  throw new IOException("Wrong type encountered when decoding OID: "+
             type.getValue());
 }
 setValue(v);
}

相关文章