Simulcast 4.2

gov.nasa.gsfc.aisb.simulcast.util
Class FtpSession

java.lang.Object
  extended by gov.nasa.gsfc.aisb.simulcast.util.FtpSession

public class FtpSession
extends java.lang.Object


Field Summary
static int DIRECTORIES_AND_FILES
           
static int DIRECTORIES_ONLY
           
static int DOS
           
static int FILES_ONLY
           
static int UNIX
           
static int UNIX_ALT1
           
 
Constructor Summary
FtpSession(java.lang.String host, int port)
          FtpSession.
FtpSession(java.lang.String host, int port, int os)
           
FtpSession(java.lang.String host, int port, java.lang.String os)
           
 
Method Summary
 void abort()
          abort.
 void ascii()
          ascii.
 void binary()
          binary.
 void cd(java.lang.String dir)
          cd.
 void cd(java.lang.String[] dirs)
           
 void delete(java.lang.String remoteFile)
          delete.
protected  void finalize()
          finalize.
 void get(java.lang.String remoteFile, java.lang.Object localDestination)
          get.
 byte[] getBytes(java.lang.String remoteFile)
          getBytes.
 java.util.LinkedList<java.lang.String> listing()
          listing.
 java.util.LinkedList<java.lang.String> listing(int which)
           
 void login(java.lang.String user, java.lang.String pw)
          login.
 void put(java.lang.Object localSource, java.lang.String remoteFile)
          put.
 void putBytes(byte[] bytes, java.lang.String remoteFile)
          putBytes.
 void quit()
          quit.
 void setListener(FtpSessionListener listener)
          setListener.
 long size(java.lang.String name)
          size.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOS

public static final int DOS
See Also:
Constant Field Values

UNIX

public static final int UNIX
See Also:
Constant Field Values

UNIX_ALT1

public static final int UNIX_ALT1
See Also:
Constant Field Values

FILES_ONLY

public static final int FILES_ONLY
See Also:
Constant Field Values

DIRECTORIES_ONLY

public static final int DIRECTORIES_ONLY
See Also:
Constant Field Values

DIRECTORIES_AND_FILES

public static final int DIRECTORIES_AND_FILES
See Also:
Constant Field Values
Constructor Detail

FtpSession

public FtpSession(java.lang.String host,
                  int port)
           throws java.lang.Exception
FtpSession.

Throws:
java.lang.Exception

FtpSession

public FtpSession(java.lang.String host,
                  int port,
                  int os)
           throws java.lang.Exception
Throws:
java.lang.Exception

FtpSession

public FtpSession(java.lang.String host,
                  int port,
                  java.lang.String os)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setListener

public void setListener(FtpSessionListener listener)
setListener.


login

public void login(java.lang.String user,
                  java.lang.String pw)
           throws java.lang.Exception
login.

Throws:
java.lang.Exception

cd

public void cd(java.lang.String dir)
        throws java.lang.Exception
cd.

Throws:
java.lang.Exception

cd

public void cd(java.lang.String[] dirs)
        throws java.lang.Exception
Throws:
java.lang.Exception

size

public long size(java.lang.String name)
          throws java.lang.Exception
size. If the name specified is a directory, the result is undefined. Returns 0 if unknown because the replies aren't as expected.

Throws:
java.lang.Exception

listing

public java.util.LinkedList<java.lang.String> listing()
                                               throws java.lang.Exception
listing.

Throws:
java.lang.Exception

listing

public java.util.LinkedList<java.lang.String> listing(int which)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

quit

public void quit()
          throws java.lang.Exception
quit.

Throws:
java.lang.Exception

abort

public void abort()
abort.


ascii

public void ascii()
           throws java.lang.Exception
ascii.

Throws:
java.lang.Exception

binary

public void binary()
            throws java.lang.Exception
binary.

Throws:
java.lang.Exception

get

public void get(java.lang.String remoteFile,
                java.lang.Object localDestination)
         throws java.lang.Exception
get. The PASV method is tried first. If that fails, the PORT method is tried.

Throws:
java.lang.Exception

getBytes

public byte[] getBytes(java.lang.String remoteFile)
                throws java.lang.Exception
getBytes. The PASV method is tried first. If that fails, the PORT method is tried.

Throws:
java.lang.Exception

put

public void put(java.lang.Object localSource,
                java.lang.String remoteFile)
         throws java.lang.Exception
put. The PASV method is tried first. If that fails, the PORT method is tried.

Throws:
java.lang.Exception

putBytes

public void putBytes(byte[] bytes,
                     java.lang.String remoteFile)
              throws java.lang.Exception
putBytes. The PASV method is tried first. If that fails, the PORT method is tried.

Throws:
java.lang.Exception

delete

public void delete(java.lang.String remoteFile)
            throws java.lang.Exception
delete.

Throws:
java.lang.Exception

finalize

protected void finalize()
finalize.

Overrides:
finalize in class java.lang.Object

Simulcast 4.2