Off the top of my head, right now, in this text box, without google, I can't write the code to copy standard input to standard output.
System.out.println(System.in)? That's wrong. You need some kind of InputReader, or BufferedInputReader, or Buffered...something. I think System.in is an InputStream, so presumably I need to do new InputReader(System.in)? Or BufferedInputReader? Should I buffer the output?
Ok, let's do some API googling (ie, not StackOverflow).
So I was... pretty wrong. I think what you want is:
public class CopyInput { public static void main(String[] args) { while (true) System.out.write(System.in.read); } }
I haven't tried to run this though.
In my defence, I have never, in all my years of working, had to ever read standard input, let alone write it out again.