tcl.lang.channel
Class Fcopy
java.lang.Object
tcl.lang.channel.Fcopy
public class Fcopy
- extends Object
This class implements an efficient copy between Channels
- Author:
- Dan Bodoh
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Fcopy
public Fcopy(Interp interp,
Channel source,
Channel destination,
long size,
String callback)
throws TclException
- Create a new Fcopy object. This constructor does not start the copy
process.
- Parameters:
interp
- The current interpretersource
- the source Channeldestination
- the destination Channelsize
- number of bytes to write to the destination; if < 0 writing
takes place to EOF on sourcecallback
- if null, return when copy is complete; if non-null, perform
the copy in the background and call script in TclObject when
copy is complete
- Throws:
TclException
getWrittenByteCount
public long getWrittenByteCount()
- Returns:
- the number of bytes written to the destination
start
public long start()
throws TclException
- Start the copy process. If a callback was provided in the constructor,
start() returns immediately. Otherwise, it waits for the copy to
cmoplete.
- Returns:
- number of bytes written to the destination, if a callback was not
provided.
- Throws:
TclException
IOException
Copyright © 2015. All rights reserved.