Java tutorial
//package com.java2s; public class Main { /** * checks for network authentication errors as well as the service call exceptions * @param response String * @return boolean isValidResult */ public static boolean isValidJsonResult(String response) { return response != null && !response.contains("<HTML") && !response.equals("") && !response.contains("<!DOCTYPE") && !response.contains("/>"); } }