Closed GoogleCodeExporter closed 9 years ago
// content is unzipped if Content-Encoding:gzip
if (mhHaderCollection.containsKey("Content-Encoding")){
if (mhHaderCollection.get("Content-Encoding").equalsIgnoreCase("gzip")){
contentIsCompressed = true;
}
}
InputStream in = null;
InputStream inProcessed = null;
try {
in = new BufferedInputStream(new FileInputStream(mDataFile));
byte[] tempBuffer = new byte[headerSize];
in.read(tempBuffer);
if (contentIsCompressed){
try{
inProcessed = new GZIPInputStream(in);
BufferedReader brContent = new BufferedReader(new InputStreamReader(inProcessed, UTF8));
String contentLine;
while ((contentLine = brContent.readLine()) != null){
content.append(contentLine);
}
}catch(Exception ex){
if (LOGD) Log.e(TAG, "Error parsing " + ex.getMessage());
content.append("Error parsing content");
}
}else{
inProcessed = in;
BufferedReader brContent = new BufferedReader(new InputStreamReader(inProcessed, UTF8));
String contentLine;
while ((contentLine = brContent.readLine()) != null){
content.append(contentLine);
}
}
}
Original comment by supp.san...@gmail.com
on 12 Jun 2012 at 7:18
how to show pictures?
maybe just use webview and provide content from some temp file containing
response content...
Original comment by supp.san...@gmail.com
on 14 Jun 2012 at 6:06
showing pictures instead of binary data
Original comment by supp.san...@gmail.com
on 14 Jun 2012 at 10:59
Attachments:
version is on the market
maybe should also parse html
Original comment by supp.san...@gmail.com
on 17 Jun 2012 at 2:09
Original issue reported on code.google.com by
supp.san...@gmail.com
on 10 Jun 2012 at 5:21