情柔小祖宗 2星
共回答了68个问题采纳率:92.1% 评论
1、将File、FileInputStream 转换为byte数组:File file = new File("file.txt");InputStream input = new FileInputStream(file);byte[] byt = new byte[input.available()];input.read(byt);
2、将byte数组转换为InputStream:byte[] byt = new byte[1024];InputStream input = new ByteArrayInputStream(byt);
3、将byte数组转换为File:File file = new File('');OutputStream output = new FileOutputStream(file);BufferedOutputStream bufferedOutput = new BufferedOutputStream(output);bufferedOutput.write(byt);
17小时前
猜你喜欢的问题
2天前1个回答
2天前1个回答
2天前1个回答
2天前2个回答
2天前1个回答
2天前2个回答
热门问题推荐
3个月前3个回答
4个月前1个回答
3年前2个回答
1个月前1个回答
3个月前1个回答
1个月前1个回答
2个月前1个回答
3个月前1个回答
1个月前3个回答