Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
/** * */ package com.cognizant.Transliterate; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.InputStream; import java.io.Reader; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.HttpConnectionManager; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.HttpURL; import org.apache.commons.httpclient.SimpleHttpConnectionManager; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.http.util.ByteArrayBuffer; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; public class Literate1 extends Activity { protected static HttpConnectionManager connectionManager = new SimpleHttpConnectionManager(); @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); /* We will show the data we read in a TextView. */ TextView tv = new TextView(this); HttpConnection connection = null; /* Will be filled and displayed later. */ String myString = null; /* Define the URL we want to load data from. */ String baseURL = "http://www.google.com/transliterate/indic?tlqt=1&langpair=en|ml&text=sukham%2C&tl_app=3"; // Setup the connection try { HttpURL httpURL = new HttpURL(baseURL); HostConfiguration host = new HostConfiguration(); host.setHost(httpURL.getHost(), httpURL.getPort()); connection = connectionManager.getConnection(host); Log.i("MyLogger", "Before Opening Conn"); // Open it connection.open(); // Post (send) data to the connection PostMethod postMethod = new PostMethod(baseURL); postMethod.execute(new HttpState(), connection); InputStream response = postMethod.getResponseBodyAsStream(); Log.i("MyLogger", response.toString()); BufferedInputStream bis = new BufferedInputStream(response); ByteArrayBuffer baf = new ByteArrayBuffer(450); int current = 0; while ((current = bis.read()) != -1) { baf.append((byte) current); } /* Convert the Bytes read to a String. */ myString = new String(baf.toByteArray()); bis.close(); Log.i("MyLogger", "myString is :" + myString); } catch (Exception e) { Log.i("MyLogger", "myString is :" + myString); Log.i("MyLogger", e.toString()); myString = e.getMessage(); } finally { connection.close(); } /* Show the String on the GUI. */ tv.setText(myString); this.setContentView(tv); } }