I have the following code, first branch is for file reading (works perfectly for file lines of any size), but is I try the same for console input, the reading blocks after 1024 characters. As there is no difference besides the source stream, I suppose that there is some limitation in System.in.
Can you please point me to some property where can I change (?internal buffer size?) of System.in.
Thanks!
if (input != null) {
reader = new MyReader(new BufferedReader(new InputStreamReader(new FileInputStream(input))));
} else {
reader = new MyReader(new BufferedReader(new InputStreamReader(System.in)));
}
Maybe you can do it like this: