public interface Source extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
关闭此源并释放此源持有的资源.
|
long |
read(Buffer sink,
long byteCount)
从中删除至少1个字节,最多为
byteCount字节, 并将它们
附加到sink。返回读取的字节数,如果该源已耗尽,则返回-1 |
Timeout |
timeout()
返回此源的超时时间.
|
long read(Buffer sink, long byteCount) throws IOException
byteCount字节, 并将它们
附加到sink。返回读取的字节数,如果该源已耗尽,则返回-1sink - 缓冲byteCount - 长度大小IOException - IOException IOException.Timeout timeout()
void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOException - IOException IOException.Copyright © 2019. All rights reserved.