我写了上传的代码可以上传6K的文件但是再大的话就会报错.
java.lang.IllegalStateException: File has been moved - cannot be read again部分代码如下
DataOutputStream out = new DataOutputStream(new FileOutputStream(filePath
          + "\\" + filename));
      InputStreamis = null;
      try {
        is = file.getInputStream();//当文件达到10K的时候运行到这里就报错了.
        byte[] buffer = new byte[1024];
        while (is.read(buffer) > 0) {
          out.write(buffer);// 写入磁盘;
        }
        return path + filename;
      }
      catch (IOException exception) {
        exception.printStackTrace();
        return "";
      }
      finally {
        if (is != null) {
          is.close();
        }
        if (out != null) {
          out.close();
        }
      }