public abstract class ForwardSource extends Object implements Source
Source| Constructor and Description |
|---|
ForwardSource(Source delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this source and releases the resources held by this source.
|
Source |
delegate() |
long |
read(Buffer sink,
long byteCount)
Removes at least 1, and up to
byteCount bytes from this and appends
them to sink. |
Timeout |
timeout()
Returns the timeout for this source.
|
String |
toString() |
public ForwardSource(Source delegate)
public final Source delegate()
public long read(Buffer sink, long byteCount) throws IOException
SourcebyteCount bytes from this and appends
them to sink. Returns the number of bytes read, or -1 if this
source is exhausted.read in interface Sourcesink - BufferbyteCount - longIOException - IOException IOException.public Timeout timeout()
Sourcepublic void close()
throws IOException
Sourceclose in interface Closeableclose in interface AutoCloseableclose in interface SourceIOException - IOException IOException.Copyright © 2019. All rights reserved.