Returns the number of bytes that are available before this stream will block. This method always returns the size of the file minus the current position. @return the number of bytes available before blocking. @throws IOException if an error occurs in this stream.
()
| 134 | * if an error occurs in this stream. |
| 135 | */ |
| 136 | @Override |
| 137 | public int available() throws IOException { |
| 138 | openCheck(); |
| 139 | synchronized (repositioningLock) { |
| 140 | // stdin requires special handling |
| 141 | if (fd == FileDescriptor.in) { |
| 142 | return (int) fileSystem.ttyAvailable(); |
| 143 | } |
| 144 | return (int) fileSystem.available(fd.descriptor); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Closes this stream. |
nothing calls this directly
no test coverage detected