// The reason why we need the stream is to be able to invoke available() on it.
// STDIN in Java is non-interruptible, non-selectable, and attempt to read
// on such stream might lead to thread being blocked without *any* way to unblock it.
// That's where available() comes it, so at least we could check whether
// anything is available to be read without blocking.
this(Channels.newChannel(baseInputStream), getNewFileno(), originalModes, new FileDescriptor(), new AtomicInteger(1), true);
this.baseInputStream = baseInputStream;
}