81,092
社区成员
发帖
与我相关
我的任务
分享
if (uploads != null)
{
File dir = new File(dirName);
if(!dir.isDirectory())
dir.mkdirs();
int i = 0;
for (; i < uploads.size(); i++)
{
java.io.InputStream is = new java.io.FileInputStream(uploads.get(i));
java.io.OutputStream os = new java.io.FileOutputStream(
dirName + }new String(fileNames.get(i).getBytes("gb2312"),"iso-8859-1"));
byte buffer[] = new byte[8192];
int count = 0;
while ((count = is.read(buffer)) > 0)
{
os.write(buffer, 0, count);
}
os.close();
is.close();
}
<constant name="struts.i18n.encoding" value="GBK"/>
java.io.OutputStream os = new java.io.FileOutputStream(
dirName + new String(fileNames.get(i).getBytes("GBK"),"utf-8"));