| Package | Description |
|---|---|
| org.aoju.bus.core.io | |
| org.aoju.bus.core.toolkit |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BufferSource
内部保存一个缓冲区,以便调用者可以在没有性能的情况下进行少量读取
它还允许客户端提前读取,在消费之前进行必要的缓冲输入
|
| Modifier and Type | Class and Description |
|---|---|
class |
Buffer
内存中字节的集合.
|
class |
DelegateSource
将调用转发给另一个调用的
Source |
class |
GzipSource
解压读取数据
|
class |
HashSource
计算其提供的全部字节流的散列的源 若要使用,请创建
使用您首选的哈希算法实例 通过读取源文件的所有字节来耗尽源文件
然后调用
HashSource.hash()来计算最终的哈希值 |
class |
InflaterSource
解压从另一个源读取的数据.
|
class |
RealSource |
| Modifier and Type | Field and Description |
|---|---|
Source |
RealSource.source |
| Modifier and Type | Method and Description |
|---|---|
Source |
DelegateSource.delegate() |
Source |
Pipe.source() |
Source |
FileSystem.source(File file) |
Source |
AsyncTimeout.source(Source source)
|
| Modifier and Type | Method and Description |
|---|---|
static HashSource |
HashSource.hmacSha1(Source source,
ByteString key) |
static HashSource |
HashSource.hmacSha256(Source source,
ByteString key) |
static HashSource |
HashSource.md5(Source source) |
static HashSource |
HashSource.sha1(Source source) |
static HashSource |
HashSource.sha256(Source source) |
Source |
AsyncTimeout.source(Source source)
|
BufferSink |
RealSink.write(Source source,
long byteCount) |
BufferSink |
BufferSink.write(Source source,
long byteCount) |
BufferSink |
Buffer.write(Source source,
long byteCount) |
long |
RealSink.writeAll(Source source) |
long |
BufferSink.writeAll(Source source) |
long |
Buffer.writeAll(Source source) |
| Constructor and Description |
|---|
DelegateSource(Source delegate) |
GzipSource(Source source) |
InflaterSource(Source source,
Inflater inflater) |
RealSource(Source source) |
| Modifier and Type | Method and Description |
|---|---|
static Source |
IoKit.source(File file)
返回从
file读取的缓冲数据 |
static Source |
IoKit.source(InputStream in)
返回从
in中读取的缓冲数据 |
static Source |
IoKit.source(Path path,
OpenOption... options)
返回从
path读取的缓冲数据 |
static Source |
IoKit.source(Socket socket)
返回从
socket读取的缓存信息。与IoKit.source(InputStream)相比,
更喜欢这个方法, 因为这个方法支持超时。当套接字读取超时时,套接字将由任务线程异步关闭 |
| Modifier and Type | Method and Description |
|---|---|
static BufferSource |
IoKit.buffer(Source source)
返回缓冲区从
source读取的字节流
返回的源将对其内存缓冲区执行批量读取 |
Copyright © 2020. All rights reserved.