public final class TimedOutputStream
extends java.io.OutputStream
| Constructor and Description |
|---|
TimedOutputStream(java.io.OutputStream parent,
long msTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
static void |
init() |
void |
write(byte[] b) |
void |
write(byte[] b,
int i1,
int i2) |
void |
write(int b)
Writes the specified byte to this output stream.
|
public TimedOutputStream(java.io.OutputStream parent,
long msTimeout)
parent - OutputStream the outputstrem which will be used for I/O operationsmsTimeout - long the timeout in milli seconds for the write operations (zero means blocking I/O)public static void init()
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte.java.io.IOException - if an I/O error occurs. In particular, an
IOException may be thrown if the output stream has
been closed.public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int i1,
int i2)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic 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 flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2023. All rights reserved.