code: @Override
      public int read (byte[] b, int off, int len) throws IOException {
          if (b == null) {
              throw new NullPointerException();
          } else if (off < 0 || len < 0 || len > b.length - off) {
              throw new IndexOutOfBoundsException();
          } else if (len == 0) {
              return 0;
          }
  
          int c;
          if (nonBlockingEnabled)
              c = this.read(0L);
          else
              c = in.read();
  
          if (c == -1) {
              return -1;
          }
          b[off] = (byte)c;
          return 1;
      }
docs: This version of read() is very specific to jline's purposes, it
  will always always return a single byte at a time, rather than filling
  the entire buffer.