byte[] buf = new byte[4096];
if (is != null) {
while (is.read(buf) > 0) {
+ //flush the buffer
}
is.close();
}
* @param httpURLConnection connection used to make request
* @return AN Outpustream that can be used to send your data.
*/
- private OutputStream getOutputStream(HttpURLConnection httpURLConnection) throws IOException {
+ OutputStream getOutputStream(HttpURLConnection httpURLConnection) throws IOException {
OutputStream outputStream = null;
try {
outputStream = httpURLConnection.getOutputStream();