@Override
    public boolean available() throws GuacamoleException {
        try {
            return input.ready() || usedLength > parseStart || parser.hasNext();
        }
        catch (IOException e) {
            throw new GuacamoleServerException(e);
        }
    }
The number of characters currently used within the data buffer. All
other characters within the buffer are free space available for
future reads.
guacamole-common/src/main/java/org/apache/guacamole/io/ReaderGuacamoleReader.java