diff --git a/runtime/Java/src/org/antlr/v4/runtime/ANTLRInputStream.java b/runtime/Java/src/org/antlr/v4/runtime/ANTLRInputStream.java index f519e81b2..e1cba64b4 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/ANTLRInputStream.java +++ b/runtime/Java/src/org/antlr/v4/runtime/ANTLRInputStream.java @@ -82,25 +82,29 @@ public class ANTLRInputStream implements CharStream { load(r, size, readChunkSize); } - public ANTLRInputStream(InputStream input) throws IOException { - this(new InputStreamReader(input), INITIAL_BUFFER_SIZE); - } + public ANTLRInputStream(InputStream input) throws IOException { + this(new InputStreamReader(input), INITIAL_BUFFER_SIZE); + } - public ANTLRInputStream(InputStream input, int size) throws IOException { - this(new InputStreamReader(input), size); - } + public ANTLRInputStream(InputStream input, int size) throws IOException { + this(new InputStreamReader(input), size); + } - public void load(Reader r, int size, int readChunkSize) - throws IOException - { - if ( r==null ) { - return; - } - if ( size<=0 ) { - size = INITIAL_BUFFER_SIZE; - } - if ( readChunkSize<=0 ) { - readChunkSize = READ_BUFFER_SIZE; + public ANTLRInputStream(InputStream input, int size, int readChunkSize) throws IOException { + this(new InputStreamReader(input), size, readChunkSize); + } + + public void load(Reader r, int size, int readChunkSize) + throws IOException + { + if ( r==null ) { + return; + } + if ( size<=0 ) { + size = INITIAL_BUFFER_SIZE; + } + if ( readChunkSize<=0 ) { + readChunkSize = READ_BUFFER_SIZE; } // System.out.println("load "+size+" in chunks of "+readChunkSize); try {