/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
/** * Returns 0 when when this stream has exhausted its input; and 1 otherwise. * A result of 1 does not guarantee that further bytes can be returned, * with or without blocking. * * <p>Although consistent with the RI, this behavior is inconsistent with * {@link InputStream#available()}, and violates the <a * href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov * Substitution Principle</a>. This method should not be used. * * @return 0 if no further bytes are available. Otherwise returns 1, * which suggests (but does not guarantee) that additional bytes are * available. * @throws IOException if this stream is closed or an error occurs */ @Override public int available() throws IOException { checkClosed(); return available ? 1 : 0; }
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {
checkClosed(); Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); if (byteCount == 0) {