code: public void setIn(InputStream in) {
      this.in = in;
      if (!(System.in instanceof ThreadLocalInputStream)) {
        throw new IllegalStateException("System.in should be set by nailgun.");
      }
      ThreadLocalInputStream tls = (ThreadLocalInputStream) System.in;
      tls.init(in);
    }
docs: Sets the current {@link InputStream} for standard input for the current nail.
  
  @param in The {@link InputStream} to use as stdin for the current nail. This should be an
  InputStream that ultimately reads from {@link NGInputStream}.