Package org.globus.io.streams
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 FTPClient
protected InputStream
protected TransferState
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FTPInputStream
(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 java.io.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:
IOException
FTPException
-
FTPInputStream
public FTPInputStream(String host, int port, String user, String pwd, String file, boolean passive, int type) throws IOException, FTPException - Throws:
IOException
FTPException
-
-
Method Details
-
get
- Throws:
IOException
FTPException
-
getSize
public long getSize()Description copied from class:GlobusInputStream
Returns the total size of input data.- Overrides:
getSize
in classGlobusInputStream
- 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 classGlobusInputStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classGlobusInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-