Class HTTPInputStream
java.lang.Object
java.io.InputStream
org.globus.io.streams.GlobusInputStream
org.globus.io.streams.HTTPInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
GassInputStream
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrivate constructor used by subclasses.HTTPInputStream(String host, int port, String file) Opens HTTP input stream connection (unsecure) -
Method Summary
Methods inherited from class InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
logger
private static org.apache.commons.logging.Log logger -
input
-
socket
-
size
protected long size
-
-
Constructor Details
-
HTTPInputStream
protected HTTPInputStream()Private constructor used by subclasses. -
HTTPInputStream
Opens HTTP input stream connection (unsecure)- Parameters:
host- host name of the HTTP server.port- port number of the HTTP server.file- file to retrieve from the server.- Throws:
IOException
-
-
Method Details
-
openSocket
- Throws:
IOException
-
get
- Throws:
IOException
-
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
-
getSize
public long getSize()Description copied from class:GlobusInputStreamReturns the total size of input data.- Overrides:
getSizein classGlobusInputStream- Returns:
- -1 if size is unknown.
-
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
-