谷歌appengine不支持FileOutputStream [英] google appengine not supporting FileOutputStream

查看:122
本文介绍了谷歌appengine不支持FileOutputStream的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写入Google appengine中的文件,但Google App Engine的Java运行时环境不支持 java.io.FileOutputStream错误消息



尽管我已经导入了

  import java.io.File; 
import java.io.FileInputStream;

import java.io.FileOutputStream;
import java.io.IOException;


解决方案

那不是java编译器错误。此类是Google App Engine中受限制的API,不允许您使用它。



阅读GAE Java运行时环境和限制: http://code.google.com/appengine/docs/java/runtime.html



您在GAE上最接近文件存储的是Blobstore API: http: //code.google.com/appengine/docs/java/blobstore/



如果您需要在代码中创建文件GAE不适合用于您。

I am trying to write to a file in Google appengine but it giving a error message java.io.FileOutputStream is not supported by Google App Engine's Java runtime environment

even though I imported

import java.io.File;
import java.io.FileInputStream;

import java.io.FileOutputStream;
import java.io.IOException;

解决方案

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.

这篇关于谷歌appengine不支持FileOutputStream的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆