if (reader != null) { try { reader.close(); } catch (IOException e) {} }
closeFile(reader);
    private static String readSingleLine(File file) throws IOException {        if (!file.isFile() || !file.canRead()) {            throw new IOException("can't open file '" + file.getAbsolutePath() + "'");        }        BufferedReader reader = null;        String line = null;        try {            reader = new BufferedReader(new FileReader(file));            line = reader.readLine();        } finally {            if (reader != null) {                try {                    reader.close();                } catch (IOException e) {}            }        }        return line;    }