Google appengine does not support FileOutputStream

I am trying to write a file to a Google appengine application, but it gives an error message java.io.FileOutputStream is not supported by Google App Engine Java runtime environment

although i imported

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

import java.io.FileOutputStream;
import java.io.IOException;
+5
source share
4 answers

Well, this is not a java compiler error. This class is a restricted API in Google App Engine, which you are forbidden to use.

Read about the Java Runtime workspace and limitations here: http://code.google.com/appengine/docs/java/runtime.html

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

If you need to create files in code, GAE is not suitable for you.

+10

java.io.ByteArrayOutputStream, FileOutputStream?

, , GAE JRE

+3

The GAE platform only allows read access to the file system in pf scope application files. If you need to write anything at all, Datastore and Blobstore are the place to record!

0
source

All Articles