@Override
    public void putPrefixedBytes(final byte[] bytes) {
        if (bytes == null) {
            checkExpand(1);
            super.putSVInt(NULL);
        } else {
            checkExpand(bytes.length + BytesUtils.VINT_MAX_SIZE);
            super.putSVInt(bytes.length);
            super.putBytes(bytes);
        }
    }
Buffer that can be expanded automatically
@author emeroad
commons-buffer/src/main/java/com/navercorp/pinpoint/common/buffer/AutomaticBuffer.java