【发布时间】:2011-02-11 04:38:41
【问题描述】:
我知道 Google App Engine 提供免费空间,但我想知道它是否仅用于将数据存储在其数据库中,或者它是否还允许我在服务器端创建文件和目录来存储我的数据?比如我可以使用下面的方法来保存文件吗?
public static void saveFile(String File_Path,StringBuffer Str_Buf,boolean Append)
{
FileOutputStream fos=null;
BufferedOutputStream bos=null;
try
{
fos=new FileOutputStream(File_Path,Append);
bos=new BufferedOutputStream(fos);
for (int j=0;j<Str_Buf.length();j++) bos.write(Str_Buf.charAt(j));
}
catch (Exception e) { e.printStackTrace(); }
finally
{
try
{
if (bos!=null)
{
bos.close();
bos=null;
}
if (fos!=null)
{
fos.close();
fos=null;
}
}
catch (Exception ex) { ex.printStackTrace(); }
}
}
【问题讨论】:
标签: google-app-engine file save