public ByteBuffersDataInput slice(long offset, long length) { if (offset < 0 || length < 0 || offset + length > this.size) { throw new IllegalArgumentException(String.format(Locale.ROOT, "slice(offset=%s, length=%s) is out of bounds: %s", offset, length, this)); } return new ByteBuffersDataInput(sliceBufferList(Arrays.asList(this.blocks), offset, length)); }
public ByteBuffersDataInput slice(long offset, long length) { if (offset < 0 || length < 0 || offset + length > this.size) { throw new IllegalArgumentException(String.format(Locale.ROOT, "slice(offset=%s, length=%s) is out of bounds: %s", offset, length, this)); } return new ByteBuffersDataInput(sliceBufferList(Arrays.asList(this.blocks), offset, length)); }