类 ANTLRFileStream

  • 所有已实现的接口:
    CharStream, IntStream

    public class ANTLRFileStream
    extends ANTLRStringStream
    This is a char buffer stream that is loaded from a file all at once when you construct the object. This looks very much like an ANTLReader or ANTLRInputStream, but it's a special case since we know the exact size of the object to load. We can avoid lots of data copying.
    • 字段详细资料

      • fileName

        protected java.lang.String fileName
    • 构造器详细资料

      • ANTLRFileStream

        public ANTLRFileStream​(java.lang.String fileName)
                        throws java.io.IOException
        抛出:
        java.io.IOException
      • ANTLRFileStream

        public ANTLRFileStream​(java.lang.String fileName,
                               java.lang.String encoding)
                        throws java.io.IOException
        抛出:
        java.io.IOException
    • 方法详细资料

      • load

        public void load​(java.lang.String fileName,
                         java.lang.String encoding)
                  throws java.io.IOException
        抛出:
        java.io.IOException
      • getSourceName

        public java.lang.String getSourceName()
        从接口复制的说明: IntStream
        Where are you getting symbols from? Normally, implementations will pass the buck all the way to the lexer who can ask its input stream for the file name or whatever.
        指定者:
        getSourceName 在接口中 IntStream
        覆盖:
        getSourceName 在类中 ANTLRStringStream