Code example for SessionInputBuffer

Methods: read

        if (pos >= contentLength) {
            return -1; 
     * Does standard {@link InputStream#read(byte[], int, int)} behavior, but 
     * also notifies the watcher when the contents have been consumed. 
     * @param b     The byte array to fill. 
     * @param off   Start filling at this position. 
     * @param len   The number of bytes to attempt to read. 
     * @return The number of bytes read, or -1 if the end of content has been 
     *  reached. 
     * @throws Should an error occur on the wrapped stream. 
    public int read (byte[] b, int off, int len) throws {