public class FileUtils extends Object
| 构造器和说明 |
|---|
FileUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
Bitmap2Bytes(BufferedImage bm) |
static String |
byte2HexStr(byte[] b)
bytes转换成十六进制字符串
|
static String |
bytesToHexString(byte[] bytes) |
static int |
createDir(File file) |
static int |
createDir(String path)
创建文件夹
|
static boolean |
deleteDirectory(String sPath)
删除目录(文件夹)以及目录下的文件
|
static boolean |
deleteFile(String sPath)
删除单个文件
|
static void |
fileCopy(File dbFile,
File backup)
方法名:
详述:
开发人员:王太顺
创建时间:2015-10-26
|
static boolean |
fileIsExists(String path)
方法名:
详述: 判断文件是否存在
开发人员:王太顺
创建时间:2015年11月13日
|
static byte[] |
getBytesFromFile(File f)
文件转化为字节数组
|
static File |
getFileFromBytes(byte[] b,
String outputFile)
把字节数组保存为一个文件
|
static byte[] |
hexStr2Bytes(String src)
bytes字符串转换为Byte值
|
static float[] |
loadFloatArray(String vPath,
int vCount)
从文件加载浮点数组
|
static Boolean |
saveFloatArray(float[] vArr,
String vPath)
把浮点数组保存到文件
|
static String |
toHexString(byte[] b) |
public static final int SUCCESS
public static final int FAILED
public static byte[] Bitmap2Bytes(BufferedImage bm)
public static String byte2HexStr(byte[] b)
byte[] - b byte数组public static byte[] hexStr2Bytes(String src)
String - src Byte字符串,每个Byte之间没有分隔符public static String bytesToHexString(byte[] bytes)
public static String toHexString(byte[] b)
public static Boolean saveFloatArray(float[] vArr, String vPath)
vArr - vPath - public static float[] loadFloatArray(String vPath, int vCount)
vPath - vCount:数组长度 - public static boolean fileIsExists(String path)
path - public static boolean deleteFile(String sPath)
sPath - 被删除文件的文件名public static boolean deleteDirectory(String sPath)
sPath - 被删除目录的文件路径public static byte[] getBytesFromFile(File f)
public static void fileCopy(File dbFile, File backup) throws IOException
dbFile - backup - IOExceptionpublic static int createDir(String path)
path - public static int createDir(File file)
Copyright © 2018. All rights reserved.