httpurlconnection local ip address
<p>I am trying to connect my android device to my sql database using my local ip address of my computer but nothing happens. I got errors.</p>

<blockquote>
  <p>Timed out while retrieving the attached javadoc for BufferedReader [in BufferedReader.class [in java.io [in E:\Installer\Application\Eclipse\sdk\android-sdk-windows\platforms\android-23\an‌​droid.jar]]] </p>
  
  <p>from my LogCat</p>
  
  <p>java.lang.RuntimeException: An error occured while executing doInBackground()</p>
  
  <p>Caused by: java.lang.ClassCastException: libcore.net.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection</p>
</blockquote>

<pre><code>class BackgroundTask extends AsyncTask&lt; Void, Void, String&gt;{

    String json_url = "http://192.168.1.106/sample/sample.php";
    HttpURLConnection httpsURLConnection = null;

    @Override
    protected String doInBackground(Void... params) {
        try {
            URL url = new URL(json_url);
            httpsURLConnection = (HttpsURLConnection) url.openConnection(); 
            InputStream inputStream = httpsURLConnection.getInputStream();
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
            StringBuilder stringBuilder = new StringBuilder();

            while((JSON_STRING = bufferedReader.readLine()) != null){
                stringBuilder.append(JSON_STRING+"\n");
            }

            bufferedReader.close();
            inputStream.close();
            httpsURLConnection.disconnect();

            return stringBuilder.toString().trim();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;

    @Override
    protected void onPostExecute(String result) {
        TextView textView = (TextView) findViewById(R.id.tvDisplay);
        textView.setText(result);
    }
}
</code></pre>

<p>Any suggestions would be appreciated.</p>