learning java FileOutputStream
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException; public class FileOutputStreamTest {
public static void main(String[] args) {
try {
var fis = new FileInputStream("FileInputStreamTest.java");
var fos = new FileOutputStream("output.txt");
{
var buf = new byte[];
var hasRead = ;
while ((hasRead = fis.read(buf)) > ){
fos.write(buf, , hasRead);
}
}
fis.close();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
learning java FileOutputStream的更多相关文章
- Learning Java language Fundamentals
Chapter 2 Learning Java language fundamentals exercises: 1.What is Unicode? Unicode is a computing ...
- learning java 文件锁
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; i ...
- learning java transient 自定义序例化
public class Person implements java.io.Serializable { private String name; private transient int age ...
- learning java 实例序列化
对Person类实例进行序例化及反序例化: Person.java public class Person implements java.io.Serializable { private Stri ...
- learning java 重定向标准输入输出
output redirectionOut: public class RedirectOut { public static void main(String[] args) throws File ...
- learning java 处理流的用法
有点重定向使用的味道 import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.Pri ...
- blogs for learning java
曹海成的专栏 http://blog.csdn.net/caohaicheng/article/details/38071097 http://blog.csdn.net/a5489888/artic ...
- Learning Java IO indexes
I/O Streams, it simplifies I/O operations, write a whole object out to stream & read back. File ...
- Learning Java 8 Syntax (Java in a Nutshell 6th)
Java is using Unicode set Java is case sensitive Comments, C/C++ style abstract, const, final, int, ...
随机推荐
- Ramdisk根文件系统映像的修改与创建
本文简述Ramdisk根文件系统映像的修改以及创建,并附相关脚本以实现自动化配置,而根文件系统的制作过程请网上自行搜索.相关过程尽可能以图的方式展示出来,重在说明操作的过程,仅供参考. Ramdisk ...
- Linux下嵌入式Web服务器BOA和CGI编程开发
**目录**一.环境搭建二.相关配置(部分)三.调试运行四.测试源码参考五.常见错误六.扩展(CCGI,SQLite) # 一.环境搭建操作系统:Ubuntu12.04 LTSboa下载地址(但是我找 ...
- python使用自带模块httplib进行http请求
#-*- encoding:utf-8 -*- import httplib, time class httpRequest(): def __init__(self, headers, reques ...
- Fiddler的使用总结
关于Fiddler的使用过程中的总结: 1. 配置手机抓包的过程,以后再补充 2.使用Fiddler发送请求 1) 第一步 抓取接口,获取请求方式,以及请求参数 2) 第二步 请求接口 点击Exec ...
- 小程序加入echart 图表
github上的地址 https://github.com/ecomfe/echarts-for-weixin 复制到当前项目根目录下 添加展示bar图表例子的文件夹 index.json 中配置使用 ...
- 面试总结之Data Science
数据科学家面试如何准备? https://mp.weixin.qq.com/s/uFJ58az8WRyaXT2nibK02g 2020 年算法 / 数据分析面试数学考点梳理 https://mp.we ...
- 在vue组件中访问vuex模块中的getters/action/state
store的结构: city模块: 在各模块使用了命名空间的情况下,即 namespaced: true 时: 组件中访问模块里的state 传统方法: this.$store.state['模块名' ...
- oracle 数据库导入导出语句
oracle的exp/imp命令用于实现对数据库的导出/导入操作;exp命令用于把数据从远程数据库服务器导到本地,生成.dmp文件;imp命令用于把本地的数据库.dmp文件从本地导入到远程的oracl ...
- 使用Prometheus针对自己的服务器采集自定义的参数
用一个简单的例子来说明. 我用express和http搭了一个最简单的服务器,监听在8081端口上. 在metrics endpoint上,我会打印出这个服务器从启动至今,服务了多少次请求.这里我只是 ...
- 前端构建工具 Gulp 压缩合并JS/CSS 并添加版本号、ES6转ES5
Gulp 基于 Node.js 的前端构建工具,可以实现前端代码的编译(sass.less).压缩合并(JS.CSS).测试:图片的压缩:已经添加 JS 和 CSS 版本号,防止浏览器缓存. 1. 安 ...