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.OutputStream
b
- 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.OutputStream
java.io.IOException
public void write(byte[] b, int i1, int i2) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
Copyright © 2023. All rights reserved.