Override available() in RandomAccessDataFile's InputStream
See gh-29295
This commit is contained in:
parent
c761dc517b
commit
49bf620f4b
|
|
@ -180,6 +180,11 @@ public class RandomAccessDataFile implements RandomAccessData {
|
||||||
return (n <= 0) ? 0 : moveOn(cap(n));
|
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
|
* Cap the specified value such that it cannot exceed the number of bytes
|
||||||
* remaining.
|
* remaining.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue