Puts a SRational (4 bytes).

@param val the val
@throws IOException Signals that an I/O exception has occurred.
358605
public void putSRational(SRational val) throws IOException {
    putInt(val.getNumerator());
    putInt(val.getDenominator());
  }
1091180
void write(Writable value) throws IOException {
    byte[] bval;
    int valSize;
    if (value instanceof BytesWritable) {
      BytesWritable val = (BytesWritable) value;
      bval = val.get();
      valSize = val.getSize();
    } else if (value instanceof Text) {
      Text val = (Text) value;
      bval = val.getBytes();
      valSize = val.getLength();
    } else {
      String sval = value.toString();
      bval = sval.getBytes("UTF-8");
      valSize = bval.length;
    }
    clientOut_.write(bval, 0, valSize);
  }
864504
@Override
	// @NotThreadSafe
	public void put(long position, byte value) throws IOException {
		int bufferNum = getBufferNum(position);
		mappedBuffers.get(bufferNum).put(getIndex(position), value);
		if(modifiedBuffers!=null) modifiedBuffers.set(bufferNum, true);
	}
266915
@Override
  public void put(double val, double weight) {
    if(weight == 0.) {
      return;
    }
    if(n <= 0) {
      n = weight;
      sum = val * weight;
      return;
    }
    val *= weight;
    final double tmp = n * val - sum * weight;
    final double oldn = n; // tmp copy
    n += weight;
    sum += val;
    m2 += tmp * tmp / (weight * n * oldn);
  }
263170
public void sendInteger2(int val) throws IOException {
    if (val < Short.MIN_VALUE || val > Short.MAX_VALUE) {
      throw new IOException("Tried to send an out-of-range integer as a 2-byte value: " + val);
    }

    int2Buf[0] = (byte) (val >>> 8);
    int2Buf[1] = (byte) val;
    pgOutput.write(int2Buf);
  }
872353
public static byte[] longToBytes(long val) {
    byte[] b = new byte[8];
    for (int i = 7; i > 0; i--) {
      b[i] = (byte) val;
      val >>>= 8;
    }
    b[0] = (byte) val;
    return b;
  }
302067
public static void assertVarValue( Object val) throws IllegalArgumentException
    {
    if( !isVarValue( val))
      {
      throw new IllegalArgumentException( "\"" + String.valueOf( val) + "\"" + " is not a valid variable value");
      }
    }
322481
public void setVal(String val) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(val)) {
            m_value = val.trim();
        } else {
            m_value = val;
        }
    }
493424
public static void writeVarLongCount(DataOutput out, long val) throws IOException {
		if (val < 0) {
			throw new IOException("Illegal count (must be non-negative): " + val);
		}

		while ((val & ~0x7FL) != 0) {
			out.write(((int) val) | 0x80);
			val >>>= 7;
		}
		out.write((int) val);
	}
470249
public static void writeUnsignedVarint(ByteBuffer buffer, int val) {
    // Extra bytes have the high bit set
    while((val & 0x7F) != val) {
      buffer.put((byte) ((val & 0x7F) | 0x80));
      val >>>= 7;
    }
    // Last byte doesn't have high bit set
    buffer.put((byte) (val & 0x7F));
  }
866864
public void
add(int val, String str) {
	check(val);
	Integer value = toInteger(val);
	str = sanitize(str);
	strings.put(str, value);
	values.put(value, str);
}
1323954
private void write(final int val)
		throws EncodingException
	{

		if (val < 0 || val > 255) {
			throw ErrorFactory.createEncodingException(
					ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE,
					"byte value out of range: " + val);
		}

		this.stream.write(val);
	}
1052265
public void addNextValue(Object val) {
    String valCountStr = val.toString();
    int pos = valCountStr.lastIndexOf("\t");
    String valStr = valCountStr;
    String countStr = "1";
    if (pos >= 0) {
      valStr = valCountStr.substring(0, pos);
      countStr = valCountStr.substring(pos + 1);
    }
    
    Long count = (Long) this.items.get(valStr);
    long inc = Long.parseLong(countStr);

    if (count == null) {
      count = inc;
    } else {
      count = count.longValue() + inc;
    }
    items.put(valStr, count);
  }
814502
public void addValue(int idx, double val) {
        values[idx] = s.plus(values[idx], val); 
    }
607895
public void putShort(short val) throws IOException {
    if (byteOrder == ByteOrder.BIG_ENDIAN) {
      writeIntCurrentPosition((val >>> 8) & 0xFF);
      writeIntCurrentPosition((val >>> 0) & 0xFF);
    }
    else {
      writeIntCurrentPosition((val >>> 0) & 0xFF);
      writeIntCurrentPosition((val >>> 8) & 0xFF);
    }
  }
1352846
public static int numBytes(String val) {

        BigInteger bInt = new BigInteger(val);
        int bytes = 0;

        while (!bInt.equals(BigInteger.ZERO)) {
            bInt = bInt.shiftRight(8);
            ++bytes;
        }
        if (bytes == 0)
            ++bytes;
        return bytes;
    }
122267
@SuppressWarnings("unchecked")
  public void add(T newValue) throws IOException {
    if (value instanceof Integer && newValue instanceof Integer) {
      value = (T) Integer.valueOf(value.intValue() + newValue.intValue());
    } else if (value instanceof Long && newValue instanceof Long) {
      value = (T) Long.valueOf(value.longValue() + newValue.longValue());
    } else if (value instanceof Float && newValue instanceof Float) {
      value = (T) Float.valueOf(value.floatValue() + newValue.floatValue());
    } else if (value instanceof Double && newValue instanceof Double) {
      value = (T) Double.valueOf(value.doubleValue() + newValue.longValue());
    } else {
      throw new IOException("incompatible NumberComparators");
    }
  }