Code example for FileReader

Methods: close

0
            checkAndInitJsContext(); 
            final String src = atts.getValue(JS_SRC_ATTR);
            if (!StringUtils.isEmpty(src)) {
                try { 
                    String jsFileContent;
                    final FileReader fileReader = new FileReader(resourceBase + File.separatorChar + src);
                    try { 
                        jsFileContent = FileCopyUtils.copyToString(fileReader);
                    } finally { 
                        fileReader.close();
                    } 
 
                    processJsAndWrite(jsFileContent);
                } catch (IOException e) {
                    log.error("Can't read js from file: " + src, e); //ignored
                } 
            } 
        } else if (isAuthBlock(uri, localName)) {
            //do nothing 
        } else if (isRedirectBlock(uri, localName)) {
            this.redirTo = atts.getValue("to");