我使用Spring3.2.5处理带有控制器的文件上传。在web.xml中配置了多部分处理。} }
public InputStream看起来,在开始处理之前,请求首先是完全读取的。
当上传开始时,立即从上传中获取文件信息。采取InputStream,并通过系统路由到它的目标,在那里,它被处理(之前没有读取到内存
public static String readRawTextFile(Context ctx, int resId) //reading text raw txt file InputStreaminputStream = ctx.getResources().openRawResource(resId);