protected void ensureCapacity(int amount) {
    int remainingSpace = buffer.capacity() - buffer.position();
    if (amount > remainingSpace) {
      expand(amount);
    }
  }
write the low-order 8 bits of the given int
geode-serialization/src/main/java/org/apache/geode/internal/serialization/BufferDataOutputStream.java