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, skip
protected 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.IOException
protected Socket openSocket(String host, int port) throws IOException
IOException
protected void get(String host, int port, String file) throws IOException
IOException
public void abort()
GlobusInputStream
abort
in class GlobusInputStream
public long getSize()
GlobusInputStream
getSize
in class GlobusInputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read(byte[] msg) throws IOException
read
in class InputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class GlobusInputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
Copyright © 2016. All rights reserved.