| 程序包 | 说明 |
|---|---|
| com.xiaoleilu.hutool.http | |
| com.xiaoleilu.hutool.io |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
HttpUtil.download(String url,
OutputStream out,
boolean isCloseOut,
StreamProgress streamProgress)
下载远程文件
|
static long |
HttpUtil.downloadFile(String url,
File destFile,
StreamProgress streamProgress)
下载远程文件
|
static String |
HttpUtil.downloadString(String url,
Charset customCharset,
StreamProgress streamPress)
下载远程文本
|
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
IoUtil.copy(InputStream in,
OutputStream out,
int bufferSize,
StreamProgress streamProgress)
拷贝流
|
static long |
IoUtil.copy(ReadableByteChannel in,
WritableByteChannel out,
int bufferSize,
StreamProgress streamProgress)
拷贝流,使用NIO,不会关闭流
|
static long |
IoUtil.copy(Reader reader,
Writer writer,
int bufferSize,
StreamProgress streamProgress)
将Reader中的内容复制到Writer中
|
static long |
IoUtil.copyByNIO(InputStream in,
OutputStream out,
int bufferSize,
StreamProgress streamProgress)
拷贝流
thanks to: https://github.com/venusdrogon/feilong-io/blob/master/src/main/java/com/feilong/io/IOWriteUtil.java
|
Copyright © 2017. All rights reserved.