OutputStream类
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
//OutputStream类
public class OutputStreamDemo {
public static void main(String[] args) {
try {
File inputFile = new File("Date.json");
File outputFile = new File("output.json");
InputStream inputStream = new FileInputStream(inputFile);
OutputStream outputStream = new FileOutputStream(outputFile);
int i = 0;
while(i != 0) {
i = inputStream.read();
outputStream.wait(i);
}
inputStream.close();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
已有 22658 名学员学习以下课程通过考试
最需教育客户端 软件问题一手掌握
去 App Store 免费下载 iOS 客户端
点击加载更多评论>>