Code example for IOException

Methods: getMessage

0
                Log.e(TAG, tag + " FAILURE ====================");
            } else { 
                Log.d(TAG, tag + " success; unable to use data");
            } 
        } catch (IOException e) {
            Log.e(TAG, "Could not write file " + e.getMessage());
        } 
    } 
 
    /** 
     * Tests a normal http url connection. 
     * @return true if it was able to connect, false otherwise. 
     */ 
    public static boolean testUrlConnection() { 
        try { 
            final HttpURLConnection conn = (HttpURLConnection) new URL("http://www.google.com/")
            .openConnection();
            try { 
                conn.connect();
                final String content = Streams.readFully(
                        new InputStreamReader(conn.getInputStream()));