Skip to content

Commit 3609deb

Browse files
committed
Inline private method (single-use and simple)
1 parent 3f39f4f commit 3609deb

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/main/java/org/apache/commons/io/input/RandomAccessFileInputStream.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,6 @@ public int read(final byte[] bytes, final int offset, final int length) throws I
211211
return randomAccessFile.read(bytes, offset, length);
212212
}
213213

214-
/**
215-
* Delegates to the underlying file.
216-
*
217-
* @param position See {@link RandomAccessFile#seek(long)}.
218-
* @throws IOException See {@link RandomAccessFile#seek(long)}.
219-
* @see RandomAccessFile#seek(long)
220-
*/
221-
private void seek(final long position) throws IOException {
222-
randomAccessFile.seek(position);
223-
}
224-
225214
@Override
226215
public long skip(final long skipCount) throws IOException {
227216
if (skipCount <= 0) {
@@ -235,7 +224,7 @@ public long skip(final long skipCount) throws IOException {
235224
final long targetPos = filePointer + skipCount;
236225
final long newPos = targetPos > fileLength ? fileLength - 1 : targetPos;
237226
if (newPos > 0) {
238-
seek(newPos);
227+
randomAccessFile.seek(newPos);
239228
}
240229
return randomAccessFile.getFilePointer() - filePointer;
241230
}

0 commit comments

Comments
 (0)