public boolean isDirect() {
        return buffer.isDirect();
    }
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