code: public static <T extends Chunkable> byte[] bytesFrom(T chunkable, int offset, int length) {
  
          byte[] data = chunkable.getChunkableData();
  
          if ( offset + length > data.length ) {
              // Arrays.copyOfRange appends 0s when the array end is exceeded.
              // Trim length manually to avoid appending extra data.
              return Arrays.copyOfRange(data, offset, data.length);
  
          } else {
              return Arrays.copyOfRange(data, offset, offset + length);
  
          }
      }
docs: Retrieve a number of raw bytes at an offset.
  
  @param offset The byte at which to start, zero-indexed
  @param length The number of bytes to return. If this is greater than the number of bytes
  available after <code>offset</code>, it will return all available bytes,
  truncated at the end.
  @return       The bytes, starting at <code>offset</code> of length <code>length</code> or
  less if truncated