当前位置:网站首页>字符输入流与字符输出流
字符输入流与字符输出流
2022-07-01 04:46:00 【洋啊桑815】
import java.io.*;
public class TestDamo {
public static void main(String[] args) {
try {
//字符输出流
Writer writer=new FileWriter("");
writer.write("一");//写一个字符
byte[] bytes="你好".getBytes();
//字符输入流
Reader reader=new FileReader("");
reader.read();//读一个字符
File f=new File("");
byte[]bytes1=new byte[(int)f.length()];//得到所有字符
} catch (Exception e) {
e.printStackTrace();
}
}
}
与字节流大同小异。
边栏推荐
- Thoughts on the construction of Meizhou cell room
- [ue4] event distribution mechanism of reflective event distributor and active call event mechanism
- C#读写应用程序配置文件App.exe.config,并在界面上显示
- STM32 光敏电阻传感器&两路AD采集
- 【FTP】FTP连接时出现“227 Entering Passive Mode”的解决方法
- Leecode records the number of good segmentation of 1525 strings
- How do I sort a list of strings in dart- How can I sort a list of strings in Dart?
- 【FTP】FTP常用命令,持续更新中……
- Quelques outils dont les chiens scientifiques pourraient avoir besoin
- LeetCode_66(加一)
猜你喜欢

Registration for R2 mobile pressure vessel filling test in 2022 and R2 mobile pressure vessel filling free test questions

2022 a special equipment related management (elevator) simulation test and a special equipment related management (elevator) certificate examination

RuntimeError: mean(): input dtype should be either floating point or complex dtypes.Got Long instead

Research on medical knowledge atlas question answering system (I)

2022 hoisting machinery command registration examination and hoisting machinery command examination registration

分布式锁的实现

2022 Shanghai safety officer C certificate examination question simulation examination question bank and answers

Kodori tree board

神经网络-使用Sequential搭建神经网络

STM32 光敏电阻传感器&两路AD采集
随机推荐
LeetCode_ 28 (implement strstr())
神经网络-卷积层
Shell之分析服务器日志命令集锦
2022.2.7-2.13 AI industry weekly (issue 84): family responsibilities
Overview of the construction details of Meizhou veterinary laboratory
LeetCode_58(最后一个单词的长度)
神经网络-使用Sequential搭建神经网络
Kodori tree board
JVM栈和堆简介
神经网络-非线性激活
2022 question bank and answers for safety production management personnel of hazardous chemical production units
【硬十宝典】——1.【基础知识】电源的分类
Construction of Meizhou nursing laboratory: equipment configuration
Announcement on the list of Guangdong famous high-tech products to be selected in 2021
解决:拖动xib控件到代码文件中,报错setValue:forUndefinedKey:this class is not key value coding-compliant for the key
VIM easy to use tutorial
CF1638E. Colorful operations Kodori tree + differential tree array
How to do the performance pressure test of "Health Code"
pytorch中常用数据集的使用方法
2022 tea master (intermediate) examination question bank and tea master (intermediate) examination questions and analysis