I am trying to get a zip file from the server. I am using HttpURLConnection to get an InputStream, and this is what I have:
myInputStream.toString().getBytes().toString() is equal to [ B@4..... byte[] bytes = Base64.decode(myInputStream.toString(), Base64.DEFAULT); String string = new String(bytes, "UTF-8"); string == &Ü¢ z m y....
I really tried to unzip this file, but nothing works, there are also so many questions, should I use GZIPInputStream or ZipInputStream? I need to save this stream as a file, or I can work with InputStream
Please help, my boss becomes impatient: O I do not know what I have to find out in this file :)
source share