public class LatchedWriter
extends java.io.Writer
| Modifier and Type | Field and Description |
|---|---|
private java.lang.StringBuilder |
buffer |
private java.lang.Throwable |
e |
private java.util.concurrent.CountDownLatch |
latch |
private java.io.Writer |
writer |
| Constructor and Description |
|---|
LatchedWriter(java.io.Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
await() |
private void |
checkException() |
void |
close() |
void |
done() |
void |
failed(java.lang.Throwable e) |
void |
flush() |
void |
write(char[] cbuf,
int off,
int len) |
private final java.util.concurrent.CountDownLatch latch
private final java.lang.StringBuilder buffer
private final java.io.Writer writer
private volatile java.lang.Throwable e
public void done()
throws java.io.IOException
java.io.IOExceptionpublic void failed(java.lang.Throwable e)
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionprivate void checkException()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Writerjava.io.IOExceptionpublic void await()