List of usage examples for java.lang String toString
public String toString()
From source file:Main.java
/** * Method to process the response and return the result in a readable format * @param response/* w w w. ja v a2 s.c o m*/ * @return String * @throws Exception */ public static String processResponse(HttpResponse response) throws Exception { HttpEntity resEntity = response.getEntity(); String result = EntityUtils.toString(resEntity); return result.toString(); }
From source file:Main.java
/** Returns the String value of the content of the Node specified. * @param Node the node whose content to get. * @return String the value of the content of the Node. An empty String if the Node * does not have any content./*from w w w .ja va2 s. com*/ */ public static String getNodeTextValue(Node pElement) { NodeList children = pElement.getChildNodes(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < children.getLength(); i++) { if (children.item(i) instanceof Text) { Text n = (Text) children.item(i); sb.append(n.getNodeValue()); } } String v = sb.toString(); return v.toString(); }
From source file:Main.java
public static String UTF8toEUCKR(String utf8) throws UnsupportedEncodingException { byte[] euckr = utf8.toString().getBytes("EUC-KR"); return byteToString(euckr); }
From source file:Main.java
public static void setLeAddress(String address) { Log.i(TAG, "setLeAddress : " + address.toString()); mLeAddress = address;/*from w ww . j a va2 s . co m*/ }
From source file:Main.java
protected static int parseVersionPart(String paramString) { int i = 0;//from w w w .j a va 2 s.com String str = paramString.toString(); int j = str.length(); int k = 0; while (true) { int m; if (i < j) { m = str.charAt(i); if ((m <= 57) && (m >= 48)) ; } else { return k; } k = k * 10 + (m - 48); i++; } }
From source file:Main.java
public static int toInt(String str) { if (str == null) return 0; return toInt(str.toString(), 0); }
From source file:Main.java
public static boolean instantExec(Context context, String command) { try {// w w w .j ava2 s. c o m runSuCommand(context, command.toString()); } catch (Exception e) { Toast.makeText(context, "E:ScriptRunner: " + e.getMessage(), Toast.LENGTH_SHORT).show(); Log.d(LOGTAG, "E:ScriptRunner: " + e.getMessage()); return false; } return true; }
From source file:sandeep.kb.android.remote.utils.Utils.java
public static void log(String name, String string) { Logger.getLogger(name).log(Level.INFO, string.toString()); }
From source file:Main.java
public static boolean instantExec_prev(Context context, String command) { try {/*from www.ja v a 2s . c o m*/ runSuCommand_prev(context, command.toString()); } catch (Exception e) { return false; } return true; }
From source file:Main.java
public static boolean instantExec_spica(Context context, String command) { try {/* w w w . j a v a 2 s . c o m*/ runSuCommand_spica(context, command.toString()); } catch (Exception e) { return false; } return true; }