Class CompiledIncludeNode

  • All Implemented Interfaces:
    java.io.Serializable

    public class CompiledIncludeNode
    extends Node
    See Also:
    Serialized Form
    • Field Detail

      • cIncludeExpression

        private java.io.Serializable cIncludeExpression
      • cPreExpression

        private java.io.Serializable cPreExpression
      • fileDateStamp

        private long fileDateStamp
    • Constructor Detail

      • CompiledIncludeNode

        public CompiledIncludeNode​(int begin,
                                   java.lang.String name,
                                   char[] template,
                                   int start,
                                   int end,
                                   ParserContext context)
    • Method Detail

      • demarcate

        public boolean demarcate​(Node terminatingNode,
                                 char[] template)
        Specified by:
        demarcate in class Node
      • readInFile

        public static java.lang.String readInFile​(TemplateRuntime runtime,
                                                  java.io.File file)
      • openInputStream

        private static java.io.FileInputStream openInputStream​(java.io.File file)
                                                        throws java.io.IOException
        Opens a FileInputStream for the specified file, else providing a detail error message than simply calling new FileInputStream(file).

        An exception is thrown if

        • the file parameter is null,
        • the file does not exist,
        • the file object exists but is a directory,
        • the file exists but cannot be read.
        Parameters:
        file - the file to open for input, can be null
        Returns:
        a new FileInputStream for the specified file
        Throws:
        java.io.FileNotFoundException - if the file is null or does not exist
        java.io.IOException - if the file object is a directory or cannot be read