@Override
    public int available() {
        final ByteBuf buffer = peekBuffer();
        if (buffer == null) {
            return 0;
        }
        return buffer.readableBytes();
    }
Closes this {@link InputStream} and releases any system resources associated with the stream.
Sets EOS, if it has not been set yet. Drains all the allocated buffers.
core/src/main/java/com/linecorp/armeria/internal/common/stream/ByteBufsInputStream.java