|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream de.fhg.igd.io.URLOutputStream
public class URLOutputStream
This is an OutputStream
wrapper that tries to open a stream
to the specified URL
.
Besides the definitions of
RFC 1738,
"socket" will be accepted as an additional protocol
identifier for the URL of a TCP socket (provided by
ServerSocket
or the like), e.g.
socket://192.168.0.1:30000
This class fully supports output to URL
s pointing to a
file. All other protocols depend on the output stream handler provided
by URLConnection
and will make the constructor throw an exception
in case output is not supported.
Field Summary | |
---|---|
protected OutputStream |
os_
The wrapped output stream |
Constructor Summary | |
---|---|
URLOutputStream(URL url)
Creates a URLOutputStream which tries to connect to
the given URL . |
Method Summary | |
---|---|
void |
close()
Calls the corresponding method on the wrapped OutputStream . |
void |
flush()
Calls the corresponding method on the wrapped OutputStream . |
void |
write(byte[] b)
Calls the corresponding method on the wrapped OutputStream . |
void |
write(byte[] b,
int off,
int len)
Calls the corresponding method on the wrapped OutputStream . |
void |
write(int b)
Calls the corresponding method on the wrapped OutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OutputStream os_
Constructor Detail |
---|
public URLOutputStream(URL url) throws IOException
URLOutputStream
which tries to connect to
the given URL
.
url
- The destination URL
IOException
- in case there is no output stream handler provided
for the given URL
Method Detail |
---|
public void write(int b) throws IOException
OutputStream
.
write
in class OutputStream
IOException
OutputStream.write(int)
public void write(byte[] b) throws IOException
OutputStream
.
write
in class OutputStream
IOException
OutputStream.write(byte[])
public void write(byte[] b, int off, int len) throws IOException
OutputStream
.
write
in class OutputStream
IOException
OutputStream.write(byte[],int,int)
public void flush() throws IOException
OutputStream
.
flush
in interface Flushable
flush
in class OutputStream
IOException
OutputStream.flush()
public void close() throws IOException
OutputStream
.
close
in interface Closeable
close
in class OutputStream
IOException
OutputStream.close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |