google appengine not supporting FileOutputStream

孤者浪人 提交于 2019-11-27 15:41:48

Well it's not a java compiler error. This class is a restricted API in Google App Engine you are not allowed to use it.

Read about the GAE Java Runtime Environment and restrictions here: http://code.google.com/appengine/docs/java/runtime.html

The closest you will get to file storage on GAE is the Blobstore API: http://code.google.com/appengine/docs/java/blobstore/

If you need to create files in code GAE is not an appropriate platform for you.

Have you tried using java.io.ByteArrayOutputStream rather than FileOutputStream?

This should allow you to use your external libraries that require files but still work within the GAE JRE white list

GAE platform allows only read access to Filesystem within scope pf application files. If at all you have to write something, Datastore and Blobstore is the place to write to!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!