1 Star 0 Fork 0

schwarizard / Chapter 10

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CharUtil2 779 Bytes
一键复制 编辑 原始数据 按行查看 历史
schwarizard 提交于 2016-04-11 19:08 . new file
import java.io.*;
public class CharUtil2 {
public static void dump(Reader src, Writer dest) throws IOException {
try(Reader input = src;Writer output = dest) {
char[] data = new char[1024];
int length;
while ((length = input.read(data)) != -1) {
output.write(data, 0, length);
}
}
}
public static void dump(InputStream src, OutputStream dest,String charset) throws IOException {
dump(
new InputStreamReader(src, charset),
new OutputStreamWriter(dest, charset));
}
public static void dump(InputStream src, OutputStream dest) throws IOException {
dump(src, dest, System.getProperty("file.encoding"));
}
}
Java
1
https://gitee.com/schwarizard/Chapter-10.git
git@gitee.com:schwarizard/Chapter-10.git
schwarizard
Chapter-10
Chapter 10
master

搜索帮助