public class FileToBytes extends Object
| 构造器和说明 |
|---|
FileToBytes() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
File2ByteArray(File file)
将文件(File)转换成byte数组
|
static byte[] |
File2ByteArray(String filePath)
将文件(File)转换成byte数组
|
static byte[] |
InputStream2ByteArray(InputStream in)
将InputStream(输入流)转换成byte数组
|
public static byte[] File2ByteArray(String filePath) throws IOException
filePath - IOExceptionpublic static byte[] File2ByteArray(File file) throws IOException
file - IOExceptionpublic static byte[] InputStream2ByteArray(InputStream in) throws IOException
in - IOExceptionCopyright © 2019. All rights reserved.