Java tutorial
//package com.java2s; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.InputStreamReader; public class Main { public static boolean tempMapAvailable() { try { FileInputStream instream = new FileInputStream("tempMapSave"); DataInputStream in = new DataInputStream(instream); BufferedReader buffered = new BufferedReader(new InputStreamReader(in)); if (buffered.readLine() != "null") { return true; } } catch (Exception e) { } return false; } }