public static void write(OutputStream os, ByteRange byteRange, int byteRangeInnerOffset)
    throws IOException {
    os.write(byteRange.getBytes(), byteRange.getOffset() + byteRangeInnerOffset,
      byteRange.getLength() - byteRangeInnerOffset);
  }
Utility methods for working with {@link ByteRange}.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java