public static void checkBounds(byte[] bytes, int offset, int length) {
        checkFromIndexSize(offset, length, bytes.length);
    }
copy google protocol buffer
https://github.com/google/protobuf/blob/master/java/src/main/java/com/google/protobuf/CodedOutputStream.java
commons/src/main/java/com/navercorp/pinpoint/common/util/BytesUtils.java