public class HTTPInputStream extends GlobusInputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.io.InputStream |
input |
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) |
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.IOExceptionprotected java.net.Socket openSocket(java.lang.String host,
int port)
throws java.io.IOException
java.io.IOExceptionprotected void get(java.lang.String host,
int port,
java.lang.String file)
throws java.io.IOException
java.io.IOExceptionpublic void abort()
GlobusInputStreamabort in class GlobusInputStreampublic long getSize()
GlobusInputStreamgetSize in class GlobusInputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] msg)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class GlobusInputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionCopyright © 2013. All Rights Reserved.