- import java.io.*;
- /*复制MP3*/
- class Test5
- {
- public static void main(String[] args) throws Exception
- {
- BufferedInputStream bis = new BufferedInputStream(new FileInputStream("小苹果.mp3"));
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("大苹果.mp3"));
-
- int len = 0 ;
- while ((len=bis.read())!=-1)
- {
- bos.write(len);
- }
- bis.close();
- bos.close();
- }
- }
复制代码
len=bis.read()的返回值应该是数字把?
bos.write(len)写入的应该也是数字把?
怎么最后输出的确是字节组成的文件? |
|