Override available() in RandomAccessDataFile's InputStream
See gh-29295
This commit is contained in:
@@ -180,6 +180,11 @@ public class RandomAccessDataFile implements RandomAccessData {
|
||||
return (n <= 0) ? 0 : moveOn(cap(n));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return (int) RandomAccessDataFile.this.length - this.position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cap the specified value such that it cannot exceed the number of bytes
|
||||
* remaining.
|
||||
|
||||
Reference in New Issue
Block a user