Class FTPInputStream
java.lang.Object
java.io.InputStream
org.globus.io.streams.GlobusInputStream
org.globus.io.streams.FTPInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
GridFTPInputStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FTPClientprotected InputStreamprotected TransferState -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFTPInputStream(String host, int port, String user, String pwd, String file) FTPInputStream(String host, int port, String user, String pwd, String file, boolean passive, int type) -
Method Summary
Methods inherited from class InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
input
-
ftp
-
state
-
-
Constructor Details
-
FTPInputStream
protected FTPInputStream() -
FTPInputStream
public FTPInputStream(String host, int port, String user, String pwd, String file) throws IOException, FTPException - Throws:
IOExceptionFTPException
-
FTPInputStream
public FTPInputStream(String host, int port, String user, String pwd, String file, boolean passive, int type) throws IOException, FTPException - Throws:
IOExceptionFTPException
-
-
Method Details
-
get
- Throws:
IOExceptionFTPException
-
getSize
public long getSize()Description copied from class:GlobusInputStreamReturns the total size of input data.- Overrides:
getSizein classGlobusInputStream- Returns:
- -1 if size is unknown.
-
abort
public void abort()Description copied from class:GlobusInputStreamAborts transfer. Usually makes sure to release all resources (sockets, file descriptors)
Does nothing by default.- Overrides:
abortin classGlobusInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classGlobusInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-