public class HTTPOutputStream extends GlobusOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
append |
protected InputStream |
in |
protected OutputStream |
output |
protected long |
size |
protected Socket |
socket |
| Modifier | Constructor and Description |
|---|---|
protected |
HTTPOutputStream()
Private constructor used by subclasses.
|
|
HTTPOutputStream(String host,
int port,
String file,
long length,
boolean append)
Opens HTTP output stream (unsecure)
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts transfer.
|
void |
close() |
void |
flush() |
protected void |
put(String host,
String file,
long length,
int waittime) |
void |
write(byte[] msg) |
void |
write(byte[] msg,
int from,
int length) |
void |
write(int b) |
protected OutputStream output
protected InputStream in
protected Socket socket
protected long size
protected boolean append
protected HTTPOutputStream()
public HTTPOutputStream(String host, int port, String file, long length, boolean append) throws GassException, IOException
host - host name of the HTTP server.port - port number of the HTTP server.file - name of the file on the remote side.length - total size of the data to be transfered.
Use -1 if unknown. The data then will be
transfered in chunks.append - if true, append data to existing file.
Otherwise, the file will be overwritten.GassExceptionIOExceptionprotected void put(String host, String file, long length, int waittime) throws IOException
IOExceptionpublic void abort()
GlobusOutputStreamabort in class GlobusOutputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void write(byte[] msg)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] msg,
int from,
int length)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class GlobusOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionCopyright © 2015. All rights reserved.