com.enterprisedt.net.ftp
Interface FTPDataSocket

All Known Implementing Classes:
FTPActiveDataSocket, FTPPassiveDataSocket

public interface FTPDataSocket

Interface for data socket classes, whether active or passive

Version:
$Revision: 1.6 $
Author:
Bruce Blackshaw

Field Summary
static java.lang.String cvsId
          Revision control id
 
Method Summary
 void close()
          Closes underlying socket(s)
 java.io.InputStream getInputStream()
          Get the appropriate input stream for reading from
 int getLocalPort()
          Returns the local port to which this socket is bound.
 java.io.OutputStream getOutputStream()
          Get the appropriate output stream for writing to
 void setTimeout(int millis)
          Set the TCP timeout on the underlying control socket.
 

Field Detail

cvsId

public static final java.lang.String cvsId
Revision control id

See Also:
Constant Field Values
Method Detail

setTimeout

public void setTimeout(int millis)
                throws java.io.IOException
Set the TCP timeout on the underlying control socket. If a timeout is set, then any operation which takes longer than the timeout value will be killed with a java.io.InterruptedException.

Parameters:
millis - The length of the timeout, in milliseconds
Throws:
java.io.IOException

getLocalPort

public int getLocalPort()
Returns the local port to which this socket is bound.

Returns:
the local port number to which this socket is bound

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the appropriate output stream for writing to

Returns:
output stream for underlying socket.
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the appropriate input stream for reading from

Returns:
input stream for underlying socket.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes underlying socket(s)

Throws:
java.io.IOException


Copyright (c) 2001-2004 Enterprise Distributed Technologies Ltd. All Rights Reserved.