JAVASE02-Unit07: 基本IO操作 、 文本数据IO操作
2016-12-31 19:58
489 查看
基本IO操作 、 文本数据IO操作
java标准IO(input/output)操作
package day07; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; /** * 缓冲流写出数据的缓冲区问题 * @author adminitartor * */ public class Bos_Write { public static void main(String[] args) throws IOException { FileOutputStream fos = new FileOutputStream("bos.txt"); BufferedOutputStream bos = new BufferedOutputStream(fos); String str = "i have a pen,i have a apple"; bos.write(str.getBytes()); /* * void flush() * 该方法可以强制将当前缓冲流中缓冲区中 * 的数据写出。 */ bos.flush(); System.out.println("写出完毕!"); bos.close(); } }
Bos_Write.java
相关文章推荐
- SE02 Unit02 基本IO操作 、 文本数据IO操作
- Java_SE07-基本IO操作,文本数据IO操作
- 基本IO操作 、 文本数据IO操作
- JAVA SE篇--07 基本 IO操作、文本数据IO操作
- Java的IO操作(二) - 带缓冲区的流对象、写入基本数据类型、实现命令行中的copy命令
- C#文件基本操作3-文本数据写入读出演示
- Java的IO操作(二) - 带缓冲区的流对象、写入基本数据类型、实现命令行中的copy命令
- Java_SE08-文本数据IO操作,异常处理
- 文本数据IO操作 、 异常处理
- 文本数据IO操作--字符流
- Java的IO操作(二) - 带缓冲区的流对象、写入基本数据类型、实现命令行中的copy命令
- java IO操作与字节流(八)过滤流输入输出基本数据类型
- SE02 Unit03 文本数据IO操作 、 异常处理
- SQL基本操作---数据查询
- 掌握SQL四条最基本的数据操作语句:Insert,Select,Update和Delete
- IO命名空间中的Directory类和File类的基本操作
- XML数据的基本操作汇总C#
- C# 对sharepoint 列表的一些基本操作,包括添加/删除/查询/上传文件给sharepoint list添加数据
- 利用System.IO中的Directory类对目录进行基本操作
- 掌握sql四条最基本的数据操作语句- -