相关疑难解决方法(0)

Google App Engine是否允许在服务器上创建文件和文件夹?

我知道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(); }
    }
  }
Run Code Online (Sandbox Code Playgroud)

google-app-engine file save

23
推荐指数
3
解决办法
2万
查看次数

标签 统计

file ×1

google-app-engine ×1

save ×1