1 Star 0 Fork 0

晓林/LearnJavaSE

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
IODemo5FileInputStream3.java 399 Bytes
Copy Edit Raw Blame History
晓林 authored 2023-03-10 21:19 +08:00 . 重构JavaSE项目
package chapter11;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.IOException;
public class IODemo5FileInputStream3 {
public static void main(String[] args) throws IOException {
try (InputStream input = new FileInputStream("readme.txt")) {
byte[] buffer = new byte[100];
int n = input.read(buffer);
System.out.println(n); //3
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/peterjxl/LearnJavaSE.git
git@gitee.com:peterjxl/LearnJavaSE.git
peterjxl
LearnJavaSE
LearnJavaSE
master

Search