antlrinputstream.java

来自「ANTLR(ANother Tool for Language Recognit」· Java 代码 · 共 44 行

JAVA
44
字号
package org.antlr.runtime;import java.io.*;/** A kind of ReaderStream that pulls from an InputStream. *  Useful for reading from stdin and specifying file encodings etc...  */public class ANTLRInputStream extends ANTLRReaderStream {	public ANTLRInputStream() {	}	public ANTLRInputStream(InputStream input) throws IOException {		this(input, null);	}	public ANTLRInputStream(InputStream input, int size) throws IOException {		this(input, size, null);	}	public ANTLRInputStream(InputStream input, String encoding) throws IOException {		this(input, INITIAL_BUFFER_SIZE, encoding);	}	public ANTLRInputStream(InputStream input, int size, String encoding) throws IOException {		this(input, size, READ_BUFFER_SIZE, encoding);	}	public ANTLRInputStream(InputStream input,							int size,							int readBufferSize,							String encoding)		throws IOException	{		InputStreamReader isr;		if ( encoding!=null ) {			isr = new InputStreamReader(input, encoding);		}		else {			isr = new InputStreamReader(input);		}		load(isr, size, readBufferSize);	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?