Convenience method to call {@link #getExistingFile(String)} and then apply {@link
FileUtils#loadSymbolList(CharSource)} on it.
14549
public ImmutableList<Symbol> getFileAsSymbolList(String param) throws IOException {
    return FileUtils.loadSymbolList(Files.asCharSource(getExistingFile(param), Charsets.UTF_8));
  }
787547
def load_file(self, filename):
        """"""
        with open(filename, 'r') as sourcefile:
            self.set_string(sourcefile.read())
1284725
public void load(String filename) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    loadMessages(builder.parse(new CSFileInputStream(filename)));
  }
707774
private File getTemplateFile(String filename) throws IOException {
        File templateFile=null;
        final String resource = TEMPLATE_RESOURCES_PATH + "/" + filename;
        InputStream is = Setup.class.getClassLoader().getResourceAsStream(resource);
        if (null == is) {
            throw new RuntimeException("Unable to load required template: " + resource);
        }
        templateFile = File.createTempFile("temp", filename);
        templateFile.deleteOnExit();
        try {
            return copyToNativeLineEndings(is, templateFile);
        } finally {
            is.close();
        }
    }
648548
public static CharSource asCompressedCharSource(File f, Charset charSet) throws IOException {
    return asCompressedByteSource(f).asCharSource(charSet);
  }
1104023
@SuppressWarnings("unchecked")
    public static <T> T load(String fileName) {
        return (T) load(new File(fileName));
    }
929848
public void load() throws FileNotFoundException {

        XMLObjectReader reader = null;
        try {
            this.preparePersistFile();

            File f = new File(persistFile.toString());
            if (f.exists()) {
                // we have V2 config
                loadVer2(persistFile.toString());
            } else {
                String s1 = persistFile.toString().replace("1.xml", ".xml");
                f = new File(s1);

                if (f.exists()) {
                    loadVer1(s1);
                }

                this.store();
                f.delete();
            }
        } catch (XMLStreamException ex) {
            logger.error(String.format("Failed to load the M3UA configuration file. \n%s", ex.getMessage()));
        } catch (FileNotFoundException e) {
            logger.warn(String.format("Failed to load the M3UA configuration file. \n%s", e.getMessage()));
        } catch (IOException e) {
            logger.error(String.format("Failed to load the M3UA configuration file. \n%s", e.getMessage()));
        }
    }
1138027
public List<String> load(String[] args) throws IOException {
    setLogLevel(Level.WARNING);

    mappings.addJreMappings();

    // Create a temporary directory as the sourcepath's first entry, so that
    // modified sources will take precedence over regular files.
    fileUtil.setSourcePathEntries(new ArrayList<>());

    ArgProcessor processor = new ArgProcessor();
    processor.processArgs(args);
    postProcessArgs();

    return processor.sourceFiles;
  }
559769
public static Resource getFileResource(String filePath, TestContext context) {
        if (filePath.contains(FILE_PATH_CHARSET_PARAMETER)) {
            return new PathMatchingResourcePatternResolver().getResource(
                    context.replaceDynamicContentInString(filePath.substring(0, filePath.indexOf(FileUtils.FILE_PATH_CHARSET_PARAMETER))));
        } else {
            return new PathMatchingResourcePatternResolver().getResource(
                    context.replaceDynamicContentInString(filePath));
        }
    }
342711
protected void load() throws FileNotFoundException {
        XMLObjectReader reader = null;
        try {
            reader = XMLObjectReader.newInstance(new FileInputStream(persistFile.toString()));

            reader.setBinding(binding);
            load(reader);
        } catch (XMLStreamException ex) {
            // this.logger.info(
            // "Error while re-creating Linksets from persisted file", ex);
        }
    }
413557
private List<String> loadRenameFile(URL url) throws IOException {
        List<String> lines = new ArrayList<String>();
        BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("UTF-8")));
        try {
            String line;
            while ((line = reader.readLine()) != null) {
                String trimmed = line.trim();
                if (!trimmed.isEmpty() && !trimmed.startsWith("#")) {
                    lines.add(trimmed);
                }
            }
        } finally {
            reader.close();
        }
        return lines;
    }
82933
private static void loadFile(@NotNull InputStream in) {

        try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) {
            String l;

            while ((l = br.readLine()) != null) {
                if (l.length() > 0 && l.charAt(0) != '#') {
                    String[] tokens = l.split("\\s+");
                    for (int i = 1; i < tokens.length; i++) {
                        mimes.put(tokens[i], tokens[0]);
                    }
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
1062037
private List<?> loadDataFromXmlFile() {
        logger.entering();
        Preconditions.checkArgument(resource.getCls() != null, "Please provide a valid type.");
        List<?> returned;

        try {
            JAXBContext context = JAXBContext.newInstance(Wrapper.class, resource.getCls());
            Unmarshaller unmarshaller = context.createUnmarshaller();
            StreamSource xmlStreamSource = new StreamSource(resource.getInputStream());
            Wrapper<?> wrapper = unmarshaller.unmarshal(xmlStreamSource, Wrapper.class).getValue();
            returned = wrapper.getList();
        } catch (JAXBException excp) {
            logger.exiting(excp.getMessage());
            throw new DataProviderException("Error unmarshalling XML file.", excp);
        }

        logger.exiting(returned);
        return returned;
    }
1111301
public String loadAsString() throws IOException, InterruptedException {
        try (InputStream is = open()) {
            return FileUtils.readAllBytesAsString(is, uncompressedSize);
        }
    }
934554
public ImmutableList<String> getFileAsStringList(String param) throws IOException {
    return FileUtils.loadStringList(Files.asCharSource(getExistingFile(param), Charsets.UTF_8));
  }
499142
public static ImmutableList<File> loadFileList(final File fileList) throws IOException {
    return loadFileList(Files.asCharSource(fileList, Charsets.UTF_8));
  }
1050072
public void load() {
        try {
            setPersistFile();
            XMLObjectReader reader = XMLObjectReader.newInstance(new FileInputStream(persistFile.toString()));
            reader.setBinding(binding);
            load(reader);
        } catch (XMLStreamException | FileNotFoundException e) {
            System.err.println(String.format("Error while load the MAP Resource state from file=%s", persistFile.toString()));
            e.printStackTrace();
        }
    }