I want to change the default input and output for a Java program to some custom input or output stream.
The main purpose is I want to redirect all the outputs and inputs to a socket connection, but the original code just reads from and writes to standard input output stream (System.in & System.out)
Note: The original code is too big to manually change it to output to the Socket
.
I do not want to dump unnecessary code here, so please don't vote to close for "Needs details or clarity" please ask for the code part if you need it and for any other details!