@@ -0,0 +1,1705 @@
+package baidu.com.commontools.utils;%0A%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.Closeable;%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0A%0A%0Apublic class FileUtils %7B%0A%0A    public static String readStreamAsString(InputStream is) throws IOException %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(is, %22UTF-8%22));%0A        StringBuilder result = new StringBuilder();%0A        String line;%0A%0A        boolean first = true;%0A        while ((line = reader.readLine()) != null) %7B%0A            if (!first) %7B%0A                result.append('%5Cn');%0A            %7D else %7B%0A                first = false;%0A            %7D%0A            result.append(line);%0A        %7D%0A%0A        return result.toString();%0A    %7D%0A%0A    public static void saveStreamToFile(InputStream is, File file) throws IOException %7B%0A        File dirFile = file.getParentFile();%0A        if (!dirFile.exists()) %7B%0A            dirFile.mkdirs();%0A        %7D%0A%0A        FileOutputStream fos = new FileOutputStream(file);%0A        try %7B%0A            byte%5B%5D buffer = new byte%5B1024 * 32%5D;%0A            int len;%0A%0A            while ((len = is.read(buffer)) != -1) %7B%0A                fos.write(buffer, 0, len);%0A            %7D%0A            fos.flush();%0A        %7D finally %7B%0A            close(fos);%0A            close(is);%0A        %7D%0A    %7D%0A%0A    public static void close(Closeable target) %7B%0A        try %7B%0A            if (target != null)%0A                target.close();%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    public static void deleteFile(String path, String fileName) %7B%0A        new File(path, fileName).delete();%0A    %7D%0A%7D%0A

change : add FileUtils.