protected class StreamUtilImpl.ReaderTransferrer extends StreamUtilImpl.BaseTransferrer<char[]>
| Modifier and Type | Field and Description |
|---|---|
private Writer |
destination
The destination to write to.
|
private Reader |
source
The source to read from (to copy).
|
| Constructor and Description |
|---|
ReaderTransferrer(Reader source,
Writer destination,
boolean keepDestinationOpen,
TransferCallback callback)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Writer |
getDestination()
This method gets the destination to transfer to.
|
protected Pool<char[]> |
getPool()
This method gets the
Pool to retrieve buffers. |
protected Reader |
getSource()
This method gets the source to transfer.
|
long |
transfer(char[] buffer)
This method performs the actual transfer.
|
call, transferisCompleted, isStopped, setCompleted, stopprivate final Reader source
private final Writer destination
public ReaderTransferrer(Reader source, Writer destination, boolean keepDestinationOpen, TransferCallback callback)
source - is Reader to read from.destination - the Writer to write to.keepDestinationOpen - true if the destination should be closed.callback - is the callback or null.StreamUtilImpl.transfer(Reader, Writer, boolean)protected Reader getSource()
StreamUtilImpl.BaseTransferrergetSource in class StreamUtilImpl.BaseTransferrer<char[]>InputStream or Reader).protected Writer getDestination()
StreamUtilImpl.BaseTransferrergetDestination in class StreamUtilImpl.BaseTransferrer<char[]>OutputStream or Writer).protected Pool<char[]> getPool()
StreamUtilImpl.BaseTransferrerPool to retrieve buffers.getPool in class StreamUtilImpl.BaseTransferrer<char[]>Pool.public long transfer(char[] buffer)
throws IOException
StreamUtilImpl.BaseTransferrertransfer in class StreamUtilImpl.BaseTransferrer<char[]>buffer - is the buffer used for the transfer.IOException - if the transfer failed.Copyright © 2001–2016 mmm-Team. All rights reserved.