public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buf = new byte[1024];
int len = 0;
while ((len = in.read(buf, 0, buf.length)) != -1) {
out.write(buf, 0, len);
}
}
Java文件流复制方法
public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buf = new byte[1024];
int len = 0;
while ((len = in.read(buf, 0, buf.length)) != -1) {
out.write(buf, 0, len);
}
}
458

被折叠的 条评论
为什么被折叠?