当前位置:网站首页>Advanced API (byte stream & buffer stream)
Advanced API (byte stream & buffer stream)
2022-07-03 07:01:00 【Bugxiu_ fu】
Byte stream
File input stream ( Read ) FileInputStream
File output stream ( write in ) FileOutputStream
Buffer flow ( Speed up efficiency )
Buffered input stream BufferedInputStream
Buffering the output stream BufferedOutputStream
Operation format :
1. structure File object
File file = new File("D:\\ty.txt");
(FileOutputStream The output stream will automatically create a file )
2. take file Object into the stream object ---- Output stream FileOutputStream
FileOutputStream fos = new FileOutputStream(file);
3. Provide written data //a
char sb = 'a';
adopt fos Object to write data
fos.write(sb);
Write one byte array at a time
String str = " I'm your brother ";
fos.write(str.getBytes());
System.out.println(" Write successfully ");
4. close resource
fos.close();
边栏推荐
- The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list
- 2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)
- Mise en place d'un environnement de développement de fonctions personnalisées
- 多个全局异常处理类,怎么规定执行顺序
- Search engine Bing Bing advanced search skills
- Sorting out the core ideas of the pyramid principle
- 服务器如何设置多界面和装IIS呢?甜甜给你解答!
- DNS forward query:
- Jmeter+influxdb+grafana of performance tools to create visual real-time monitoring of pressure measurement -- problem record
- crontab定时任务
猜你喜欢

Software testing assignment - day 1

JUC forkjoinpool branch merge framework - work theft
![[classes and objects] explain classes and objects in simple terms](/img/41/250457530880dfe3728432c2ccd50b.png)
[classes and objects] explain classes and objects in simple terms

【无标题】

Notes on the core knowledge of Domain Driven Design DDD

机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)

DBNet:具有可微分二值化的实时场景文本检测

Jenkins

In depth analysis of reentrantlock fair lock and unfair lock source code implementation

EasyExcel
随机推荐
PHP install the spool extension
crontab定时任务
Understand software testing
The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
EasyExcel
MySQL syntax (basic)
Summary of UI module design and practical application of agent mode
服务器如何设置多界面和装IIS呢?甜甜给你解答!
Software testing assignment - day 3
dataworks自定義函數開發環境搭建
SQL implementation merges multiple rows of records into one row
Notes on the core knowledge of Domain Driven Design DDD
Shim and Polyfill in [concept collection]
PHP install composer
卡特兰数(Catalan)的应用场景
MySQL transaction rollback, error points record
萬卷書 - 價值投資者指南 [The Education of a Value Investor]
[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*
Unit test notes
2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)