HTTPOutputStream (Java Globus API)
org.globus.io.streams
Class HTTPOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--org.globus.io.streams.GlobusOutputStream
|
+--org.globus.io.streams.HTTPOutputStream
- Direct Known Subclasses:
- GassOutputStream
- public class HTTPOutputStream
- extends GlobusOutputStream
|
Field Summary |
protected boolean |
append
|
protected boolean |
contArr
|
protected java.net.Socket |
gassS
|
protected java.io.InputStream |
in
|
protected java.io.OutputStream |
output
|
protected org.globus.io.streams.ReplyThread |
reply
|
protected int |
size
|
|
Constructor Summary |
protected |
HTTPOutputStream()
Private constructor used by subclasses. |
|
HTTPOutputStream(java.lang.String host,
int port,
java.lang.String file,
int length,
boolean append)
Opens HTTP output stream (unsecure) |
|
Method Summary |
void |
abort()
Aborts transfer. |
void |
close()
|
void |
flush()
|
protected void |
put(java.lang.String host,
java.lang.String file,
int length,
int waittime)
|
void |
write(byte[] msg)
|
void |
write(byte[] msg,
int from,
int length)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
output
protected java.io.OutputStream output
in
protected java.io.InputStream in
gassS
protected java.net.Socket gassS
size
protected int size
append
protected boolean append
reply
protected org.globus.io.streams.ReplyThread reply
contArr
protected boolean contArr
HTTPOutputStream
protected HTTPOutputStream()
- Private constructor used by subclasses.
HTTPOutputStream
public HTTPOutputStream(java.lang.String host,
int port,
java.lang.String file,
int length,
boolean append)
throws GassException,
java.io.IOException
- Opens HTTP output stream (unsecure)
- Parameters:
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.
put
protected void put(java.lang.String host,
java.lang.String file,
int length,
int waittime)
throws java.io.IOException
java.io.IOException
abort
public void abort()
- Description copied from class:
GlobusOutputStream
- Aborts transfer. Usually makes sure to
release all resources (sockets, file descriptors)
Does nothing by default.
- Overrides:
abort in class GlobusOutputStream
close
public void close()
throws java.io.IOException
- Overrides:
close in class java.io.OutputStream
java.io.IOException
write
public void write(byte[] msg)
throws java.io.IOException
- Overrides:
write in class java.io.OutputStream
java.io.IOException
write
public void write(byte[] msg,
int from,
int length)
throws java.io.IOException
- Overrides:
write in class java.io.OutputStream
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Overrides:
write in class GlobusOutputStream
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Overrides:
flush in class java.io.OutputStream
java.io.IOException