MCPcopy Create free account
hub / github.com/davidgiven/luje / available

Method available

lib/java/io/FileInputStream.java:136–146  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

openCheckMethod · 0.95
ttyAvailableMethod · 0.65
availableMethod · 0.65

Tested by

no test coverage detected