Returns an InputStream for reading data from the resource pointed by this URLConnection. It throws an UnknownServiceException by default. This method must be overridden by its subclasses.
Returns: the InputStream to read data from.
Throws: IOException - if no InputStream could be created.
1. Check if Response Code is OK
2. Declare an InputStream and Set an InputStream named myInputStream.
3. Add the below line in the try/catch created in step #1.
myInputStream = myHttpURLConnection.getInputStream();
4. Compile and run!
Resources:
http://developer.android.com/reference/java/net/URLConnection.html#getInputStream()
myInputStream = myHttpURLConnection.getInputStream();
4. Compile and run!
Resources:
http://developer.android.com/reference/java/net/URLConnection.html#getInputStream()