Package org.globus.ftp
Class DataSinkStream
- java.lang.Object
-
- org.globus.ftp.DataSinkStream
-
- All Implemented Interfaces:
DataSink
public class DataSinkStream extends java.lang.Object implements DataSink
Reference implementation of DataSink. It can be used with non-parallel transfers. It cannot be used with Extended Block Mode because it uses implicit assumption that data arrives in correct sequence. It is not thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoFlushprotected booleanignoreOffsetprotected longoffsetprotected java.io.OutputStreamout
-
Constructor Summary
Constructors Constructor Description DataSinkStream(java.io.OutputStream out)DataSinkStream(java.io.OutputStream out, boolean autoFlush, boolean ignoreOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this data sink and releases any system resources associated with this sink.voidwrite(Buffer buffer)Writes the specified buffer to this data sink.
-
-
-
Method Detail
-
write
public void write(Buffer buffer) throws java.io.IOException
Description copied from interface:DataSinkWrites the specified buffer to this data sink.
Note:buffer.getOffset()might return -1 if the transfer mode used does not support data offsets, for example stream transfer mode.
-
-