public class HTTPInputStream extends GlobusInputStream
Modifier and Type | Field and Description |
---|---|
protected java.io.InputStream |
input |
private static org.apache.commons.logging.Log |
logger |
protected long |
size |
protected java.net.Socket |
socket |
Modifier | Constructor and Description |
---|---|
protected |
HTTPInputStream()
Private constructor used by subclasses.
|
|
HTTPInputStream(java.lang.String host,
int port,
java.lang.String file)
Opens HTTP input stream connection (unsecure)
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts transfer.
|
int |
available() |
void |
close() |
protected void |
get(java.lang.String host,
int port,
java.lang.String file) |
long |
getSize()
Returns the total size of input data.
|
protected java.net.Socket |
openSocket(java.lang.String host,
int port) |
int |
read() |
int |
read(byte[] msg) |
int |
read(byte[] buf,
int off,
int len) |
private static org.apache.commons.logging.Log logger
protected java.io.InputStream input
protected java.net.Socket socket
protected long size
protected HTTPInputStream()
public HTTPInputStream(java.lang.String host, int port, java.lang.String file) throws java.io.IOException
host
- host name of the HTTP server.port
- port number of the HTTP server.file
- file to retrieve from the server.java.io.IOException
protected java.net.Socket openSocket(java.lang.String host, int port) throws java.io.IOException
java.io.IOException
protected void get(java.lang.String host, int port, java.lang.String file) throws java.io.IOException
java.io.IOException
public void abort()
GlobusInputStream
abort
in class GlobusInputStream
public long getSize()
GlobusInputStream
getSize
in class GlobusInputStream
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] msg) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buf, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class GlobusInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException