code: public void setInputReader(Reader reader) {
          if (reader instanceof BufferedReader) {
              this.in = (BufferedReader) reader;
          } else if (reader == null) {
              this.in = null;
          } else {
              this.in = new BufferedReader(reader);
          }
      }
docs: Overwrites the default reader from which the input is taken.