public InputStream executeDownload(String url,String cookie) throws IOException {
  String[][] headerParams=new String[][]{{"Cookie",cookie},{"User-Agent","AndroidDownloadManager/6.0.1 (Linux; U; Android 6.0.1; Nexus 6P Build/MTC19T)"}};
  HttpEntity httpEntity=executeGet(url,null,headerParams);
  return httpEntity.getContent();
}

public InputStream executeDownload ( String url , String cookie ) throws IOException { String [ ] [ ] headerParams = new String [ ] [ ] { { "Cookie" , cookie } , { "User-Agent" , "AndroidDownloadManager/6.0.1 (Linux; U; Android 6.0.1; Nexus 6P Build/MTC19T)" } } ; HttpEntity httpEntity = executeGet ( url , null , headerParams ) ; return httpEntity . getContent ( ) ; }
fetches url content by executing get request with provided cookie string .
