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.GassException
IOException
protected void put(String host, String file, long length, int waittime) throws IOException
IOException
public void abort()
GlobusOutputStream
abort
in class GlobusOutputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void write(byte[] msg) throws IOException
write
in class OutputStream
IOException
public void write(byte[] msg, int from, int length) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class GlobusOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
Copyright © 2016. All rights reserved.