public static void main(String[] args) throws IOException{
String url = "localhost:8080/eom/mt/MTCon/upload.json";
File file = new File("111.txt");
FileInputStream inputStream = new FileInputStream(file);
System.out.println(file.length());
byte[] byt = new byte[(int) file.length()];
int read = inputStream.read(byt);
System.out.println(read+":"+byt.length);
}
文件转字节流数组,
最新推荐文章于 2024-07-13 02:57:38 发布