public class HTTPOutputStream extends GlobusOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
append |
protected java.io.InputStream |
in |
protected java.io.OutputStream |
output |
protected long |
size |
protected java.net.Socket |
socket |
| Modifier | Constructor and Description |
|---|---|
protected |
HTTPOutputStream()
Private constructor used by subclasses.
|
|
HTTPOutputStream(java.lang.String host,
int port,
java.lang.String file,
long length,
boolean append)
Opens HTTP output stream (unsecure)
|
protected java.io.OutputStream output
protected java.io.InputStream in
protected java.net.Socket socket
protected long size
protected boolean append
protected HTTPOutputStream()
public HTTPOutputStream(java.lang.String host,
int port,
java.lang.String file,
long length,
boolean append)
throws GassException,
java.io.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.GassExceptionjava.io.IOExceptionprotected void put(java.lang.String host,
java.lang.String file,
long length,
int waittime)
throws java.io.IOException
java.io.IOExceptionpublic void abort()
GlobusOutputStreamabort in class GlobusOutputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] msg)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] msg,
int from,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class GlobusOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2013. All Rights Reserved.