8

How to stop HttpURLConnection .getInputStream()

view full story
linux-howto

http://stackoverflow.com – Below is my code: private HttpURLConnection connection; private InputStream is; public void upload() { try { URL url = new URL(URLPath); connection = (HttpURLConnection)url.openConnection(); connection.setConnectTimeout(30000); connection.setReadTimeout(30000); connection.setDoInput(true); connection.setUseCaches(false); connection.connect(); is = connection.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } public void stopupload() { connection = null; is = null; } When I upload (HowTos)