本文介绍了1M以上的App Engine 1.4.0 urlfetch()数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我的应用引擎版本是1.4.0.dim dem.bil位于/war/dem.bil目录下,这些是我的代码,用于获取3M的数据dem.bil:
尝试{
URLConnection a = url.openConnection();
InputStream b = a.getInputStream();
int len = a.getContentLength();
if(len return null;
}
//System.out.println(\"Total:+ len);
byte [] c =新字节[len];
b.read(c,0,len);
return c;
} catch(Exception e){
e.printStackTrace();
返回null;
}
}



我知道1.4.0版将URLFetch响应限制增加到32MB,但是当它进入InputStream b = a时。的getInputStream();它的调试是com.google.appengine.api.urlfetch.ResponseTooLargeException:来自url localhost:8888 / dem.bil的响应太大了。.so有人可以告诉我为什么?或者我的代码有问题? p>

解决方案

自1.4.0版本发布以来,限制已提升至32mb。

请参阅:


the version of my app engine is 1.4.0.the data dem.bil is under the /war/dem.bil directory.and these are my codes to fetch the data dem.bil that is 3M: try{ URLConnection a = url.openConnection(); InputStream b = a.getInputStream(); int len = a.getContentLength(); if (len < 0) { return null; } //System.out.println("Total: "+len); byte[] c = new byte[len]; b.read(c,0,len); return c; }catch (Exception e) { e.printStackTrace(); return null; } }

i know the version 1.4.0 increased the URLFetch response limit to 32MB,but when it goes to InputStream b = a.getInputStream(); it's debug is "com.google.appengine.api.urlfetch.ResponseTooLargeException: The response from url localhost:8888/dem.bil was too large. ".so can someone can tell me why?or some wrong with my codes?

解决方案

Since the 1.4.0 version was released, the limit was raised to 32mb.

See: http://googleappengine.blogspot.com/2010/12/happy-holidays-from-app-engine-team-140.html

这篇关于1M以上的App Engine 1.4.0 urlfetch()数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 23:57