欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

數組如何轉換成fileInputStream

錢琪琛2年前18瀏覽0評論

數組如何轉換成fileInputStream?

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);