public boolean equals(Object obj) {
        if (!(obj instanceof GrowableByteBuffer)) {
            return false;
        }
        GrowableByteBuffer rhs = (GrowableByteBuffer)obj;
        if (!buffer.equals(rhs.buffer)) {
            return false;
        }
        return true;
    }
Computes the size used for storing the given integer using 1 or 4 bytes.

@param number the integer to check length of
@return the number of bytes used to store it; 1 or 4
vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java