当前位置:网站首页>字符输入流与字符输出流
字符输入流与字符输出流
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();
}
}
}
与字节流大同小异。
边栏推荐
- Openresty rewrites the location of 302
- Shell之一键自动部署Redis任意版本
- 2022 question bank and answers for safety production management personnel of hazardous chemical production units
- 2022 t elevator repair question bank and simulation test
- Applications and features of VR online exhibition
- Neural network convolution layer
- Fitness without equipment
- One click shell to automatically deploy any version of redis
- Common UNIX Operation and maintenance commands of shell
- Research on medical knowledge atlas question answering system (I)
猜你喜欢

【硬十宝典】——2.【基础知识】开关电源各种拓扑结构的特点

Why is Internet thinking not suitable for AI products?

LM小型可编程控制器软件(基于CoDeSys)笔记二十:plc通过驱动器控制步进电机

无器械健身

常用的Transforms中的方法

JVM栈和堆简介

Simple implementation of slf4j
![AssertionError assert I.ndim == 4 and I.shape[1] == 3](/img/b1/0109bb0f893eb4c8915df36c100907.png)
AssertionError assert I.ndim == 4 and I.shape[1] == 3

One click shell to automatically deploy any version of redis

2022 a special equipment related management (elevator) simulation test and a special equipment related management (elevator) certificate examination
随机推荐
Basic skeleton of neural network nn Use of moudle
Registration for R2 mobile pressure vessel filling test in 2022 and R2 mobile pressure vessel filling free test questions
Leecode records the number of good segmentation of 1525 strings
LeetCode_ 66 (plus one)
Tencent has five years of testing experience. It came to the interview to ask for 30K, and saw the so-called software testing ceiling
RDF query language SPARQL
2022-02-15 (399. Division evaluation)
Pytest automated testing - compare robotframework framework
解决:拖动xib控件到代码文件中,报错setValue:forUndefinedKey:this class is not key value coding-compliant for the key
[2020 overview] overview of link prediction based on knowledge map embedding
Shell之分析服务器日志命令集锦
科研狗可能需要的一些工具
LeetCode_28(实现 strStr())
【FTP】FTP连接时出现“227 Entering Passive Mode”的解决方法
Neural networks - use of maximum pooling
神经网络的基本骨架-nn.Moudle的使用
Question bank and answers for chemical automation control instrument operation certificate examination in 2022
神经网络-卷积层
Dual contractual learning: text classification via label aware data augmentation reading notes
The longest increasing subsequence and its optimal solution, total animal weight problem