FTPInputStream (Java Globus API)

org.globus.io.streams
Class FTPInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.globus.io.streams.GlobusInputStream
              |
              +--org.globus.io.streams.FTPInputStream
Direct Known Subclasses:
GridFTPInputStream, GSIFTPInputStream

public class FTPInputStream
extends GlobusInputStream


Field Summary
protected  java.net.Socket data
           
protected  FTPClient ftp
           
protected  java.io.InputStream input
           
protected  java.net.ServerSocket server
           
 
Constructor Summary
FTPInputStream(java.lang.String host, int port, java.lang.String user, java.lang.String pwd, java.lang.String file)
           
 
Method Summary
 void abort()
          Aborts transfer.
 int available()
           
 void close()
           
 void get(boolean passive, java.lang.String remoteFile)
           
 int getSize()
          Returns the total size of input data.
protected  void init(java.lang.String host, int port, java.lang.String user, java.lang.String pwd, java.lang.String file)
           
 int read()
           
 int read(byte[] msg)
           
 int read(byte[] buf, int off, int len)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

protected java.io.InputStream input

ftp

protected FTPClient ftp

data

protected java.net.Socket data

server

protected java.net.ServerSocket server
Constructor Detail

FTPInputStream

public FTPInputStream(java.lang.String host,
                      int port,
                      java.lang.String user,
                      java.lang.String pwd,
                      java.lang.String file)
               throws java.io.IOException,
                      FTPException
Method Detail

init

protected void init(java.lang.String host,
                    int port,
                    java.lang.String user,
                    java.lang.String pwd,
                    java.lang.String file)
             throws java.io.IOException,
                    FTPException
java.io.IOException
FTPException

get

public void get(boolean passive,
                java.lang.String remoteFile)
         throws java.io.IOException,
                FTPException
java.io.IOException
FTPException

getSize

public int getSize()
Description copied from class: GlobusInputStream
Returns the total size of input data.

Overrides:
getSize in class GlobusInputStream
Returns:
-1 if size is unknown.

abort

public void abort()
Description copied from class: GlobusInputStream
Aborts transfer. Usually makes sure to release all resources (sockets, file descriptors)
Does nothing by default.

Overrides:
abort in class GlobusInputStream

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.InputStream
java.io.IOException

read

public int read(byte[] msg)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
java.io.IOException

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
java.io.IOException

read

public int read()
         throws java.io.IOException
Overrides:
read in class GlobusInputStream
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
java.io.IOException