public class HTTPInputStream extends GlobusInputStream
| Modifier and Type | Field and Description |
|---|---|
protected InputStream |
input |
protected long |
size |
protected Socket |
socket |
| Modifier | Constructor and Description |
|---|---|
protected |
HTTPInputStream()
Private constructor used by subclasses.
|
|
HTTPInputStream(String host,
int port,
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(String host,
int port,
String file) |
long |
getSize()
Returns the total size of input data.
|
protected Socket |
openSocket(String host,
int port) |
int |
read() |
int |
read(byte[] msg) |
int |
read(byte[] buf,
int off,
int len) |
mark, markSupported, reset, skipprotected InputStream input
protected Socket socket
protected long size
protected HTTPInputStream()
public HTTPInputStream(String host, int port, String file) throws IOException
host - host name of the HTTP server.port - port number of the HTTP server.file - file to retrieve from the server.IOExceptionprotected Socket openSocket(String host, int port) throws IOException
IOExceptionprotected void get(String host, int port, String file) throws IOException
IOExceptionpublic void abort()
GlobusInputStreamabort in class GlobusInputStreampublic long getSize()
GlobusInputStreamgetSize in class GlobusInputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read(byte[] msg)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read()
throws IOException
read in class GlobusInputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionCopyright © 2016. All rights reserved.