/** * Update the length of this range. {@code offset + length} should not be * greater than {@code bytes.length}. If {@code position} is greater than the * new {@code length}, sets {@code position} to {@code length}. * * @param length * The new length of this range. * @return this. */ @Override public PositionedByteRange setLength(int length) { this.position = Math.min(position, length); super.setLength(length); return this; }
/** * Update the length of this range. {@code offset + length} should not be * greater than {@code bytes.length}. If {@code position} is greater than the * new {@code length}, sets {@code position} to {@code length}. * * @param length The new length of this range. * @return this. */ @Override public PositionedByteRange setLength(int length) { this.position = Math.min(position, length); super.setLength(length); return this; }
/** * Update the length of this range. {@code offset + length} should not be * greater than {@code bytes.length}. If {@code position} is greater than the * new {@code length}, sets {@code position} to {@code length}. * * @param length * The new length of this range. * @return this. */ @Override public PositionedByteRange setLength(int length) { this.position = Math.min(position, length); super.setLength(length); return this; }
/** * Update the length of this range. {@code offset + length} should not be * greater than {@code bytes.length}. If {@code position} is greater than the * new {@code length}, sets {@code position} to {@code length}. * * @param length * The new length of this range. * @return this. */ @Override public PositionedByteRange setLength(int length) { this.position = Math.min(position, length); super.setLength(length); return this; }
/** * Update the length of this range. {@code offset + length} should not be * greater than {@code bytes.length}. If {@code position} is greater than the * new {@code length}, sets {@code position} to {@code length}. * * @param length * The new length of this range. * @return this. */ @Override public PositionedByteRange setLength(int length) { this.position = Math.min(position, length); super.setLength(length); return this; }