DataSourceStream (Java Globus API)

org.globus.ftp
Class DataSourceStream

java.lang.Object
  |
  +--org.globus.ftp.DataSourceStream
All Implemented Interfaces:
DataSource

public class DataSourceStream
extends java.lang.Object
implements DataSource

Reference implementation of DataSource. It can be used with non-parallel transfers. It cannot be used with Extended Block Mode because it is not thread safe.


Field Summary
protected  int bufferSize
           
protected  java.io.InputStream in
           
 
Constructor Summary
DataSourceStream(java.io.InputStream in)
           
DataSourceStream(java.io.InputStream in, int bufferSize)
           
 
Method Summary
 void close()
           
 Buffer read()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected java.io.InputStream in

bufferSize

protected int bufferSize
Constructor Detail

DataSourceStream

public DataSourceStream(java.io.InputStream in)

DataSourceStream

public DataSourceStream(java.io.InputStream in,
                        int bufferSize)
Method Detail

read

public Buffer read()
            throws java.io.IOException
Specified by:
read in interface DataSource
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface DataSource
java.io.IOException