类 FileUtil
- java.lang.Object
-
- io.itit.itf.okhttp.util.FileUtil
-
public class FileUtil extends Object
- 作者:
- icecooly
-
-
构造器概要
构造器 构造器 说明 FileUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static longcopy(InputStream input, OutputStream output)static byte[]getBytes(String filePath)static StringgetContent(File file)static StringgetContent(String filePath)static voidsaveContent(byte[] bb, File file)static voidsaveContent(InputStream is, File file)static voidsaveContent(String content, File file)
-
-
-
方法详细资料
-
getContent
public static String getContent(String filePath) throws IOException
- 参数:
filePath-- 返回:
- 抛出:
IOException
-
getContent
public static String getContent(File file) throws IOException
- 参数:
file-- 返回:
- 抛出:
IOException
-
getBytes
public static byte[] getBytes(String filePath) throws IOException
- 参数:
filePath-- 返回:
- 抛出:
IOException
-
saveContent
public static void saveContent(String content, File file) throws IOException
- 参数:
content-file-- 抛出:
IOException
-
saveContent
public static void saveContent(InputStream is, File file) throws IOException
- 抛出:
IOException
-
saveContent
public static void saveContent(byte[] bb, File file) throws IOException- 参数:
bb-file-- 抛出:
IOException
-
copy
public static long copy(InputStream input, OutputStream output) throws IOException
- 参数:
input-output-- 返回:
- 抛出:
IOException
-
-