Java OutputStream類(lèi)案例
OutputStream類(lèi)
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
//OutputStream類(lèi)
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();
}
}
}
繼續(xù)查找其他問(wèn)題的答案?
- 開(kāi)始學(xué)習(xí)
海報(bào)設(shè)計(jì)精品錄播課程2121次觀(guān)看
開(kāi)始學(xué)習(xí)字體設(shè)計(jì)精品錄播課程2121次觀(guān)看
開(kāi)始學(xué)習(xí)室內(nèi)設(shè)計(jì)精品錄播課程2121次觀(guān)看
開(kāi)始學(xué)習(xí)影視動(dòng)畫(huà)精品錄播課程2121次觀(guān)看
開(kāi)始學(xué)習(xí)UI設(shè)計(jì)精品錄播課程2121次觀(guān)看
開(kāi)始學(xué)習(xí)
點(diǎn)擊加載更多評(píng)論>>