public static void putInt(OutputStream out, final int value) throws IOException {
    // We have writeInt in ByteBufferOutputStream so that it can directly write
    // int to underlying
    // ByteBuffer in one step.
    if (out instanceof ByteBufferWriter) {
      ((ByteBufferWriter) out).writeInt(value);
    } else {
      StreamUtils.writeInt(out, value);
    }
  }
Put in output stream 32 bit integer (Big Endian byte order).
@param out   Where to put integer.
@param value Value of integer.
@throws IOException On stream error.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java