Here you can find the source of loadPathPreferencesFromFile(File inputFile)
Parameter | Description |
---|---|
inputFile | the file to load the path preferences from |
Parameter | Description |
---|---|
FileNotFoundException | if a FileNotFoundException occurs |
IOException | if an IOException occurs |
public static void loadPathPreferencesFromFile(File inputFile) throws FileNotFoundException, IOException
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Main { /**//from w ww. ja va2 s.c om * Loads the path preferences from a text file. * * @param inputFile the file to load the path preferences from * * @throws FileNotFoundException if a FileNotFoundException occurs * @throws IOException if an IOException occurs */ public static void loadPathPreferencesFromFile(File inputFile) throws FileNotFoundException, IOException { BufferedReader br = new BufferedReader(new FileReader(inputFile)); try { String line; while ((line = br.readLine()) != null) { line = line.trim(); if (!line.equals("") && !line.startsWith("#")) { } } } finally { br.close(); } } }