edtFTPj/Free - Open-source FTP library for Java | Download


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.9 $
Author:
Bruce Blackshaw

Field Summary
static java.lang.String cvsId
          Revision control id
 
Method Summary
 void close()
          Closes underlying socket(s)
 void closeChild()
          Closes child socket
 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

static final java.lang.String cvsId
Revision control id

See Also:
Constant Field Values
Method Detail

setTimeout

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

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

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

getOutputStream

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

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

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

Throws:
java.io.IOException

closeChild

void closeChild()
                throws java.io.IOException
Closes child socket

Throws:
java.io.IOException


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