当前位置:网站首页>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();
边栏推荐
- Notes on the core knowledge of Domain Driven Design DDD
- Inno setup production and installation package
- Architecture notes
- [set theory] partition (partition | partition example | partition and equivalence relationship)
- Win 10 find the port and close the port
- 10000小時定律不會讓你成為編程大師,但至少是個好的起點
- Software testing learning - the next day
- VMware virtual machine C disk expansion
- Flask Foundation
- php安装swoole扩展
猜你喜欢
[vscode - vehicle plug-in reports an error] cannot find module 'xxx' or its corresponding type declarations Vetur(2307)
Pytest -- write and manage test cases
[set theory] partition (partition | partition example | partition and equivalence relationship)
Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
【类和对象】深入浅出类和对象
Inno setup production and installation package
In depth analysis of reentrantlock fair lock and unfair lock source code implementation
Daily question brushing record (11)
Software testing learning - day 3
VMware virtual machine C disk expansion
随机推荐
Winter vacation work of software engineering practice
[day15] introduce the features, advantages and disadvantages of promise, and how to implement it internally. Implement promise by hand
机械观和系统观的科学思维方式各有什么特点和作用
mysql误删root账户导致无法登录
[untitled]
每日刷题记录 (十一)
These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products
How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
【类和对象】深入浅出类和对象
这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意
Software testing assignment - the next day
Summary of UI module design and practical application of agent mode
Inno setup production and installation package
[Code] occasionally take values, judge blanks, look up tables, verify, etc
POI excel percentage
每日刷題記錄 (十一)
Class and object summary
利用C#实现Pdf转图片
Modify MySQL password
The list of "I'm crazy about open source" was released in the first week, with 160 developers on the list