Package com.github.mustachejava.util
Class LatchedWriter
- java.lang.Object
-
- java.io.Writer
-
- com.github.mustachejava.util.LatchedWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class LatchedWriter extends java.io.WriterBuffer content while a future is being evaluated in another thread.
-
-
Constructor Summary
Constructors Constructor Description LatchedWriter(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawait()private voidcheckException()voidclose()voiddone()voidfailed(java.lang.Throwable e)voidflush()voidwrite(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
done
public void done() throws java.io.IOException- Throws:
java.io.IOException
-
failed
public void failed(java.lang.Throwable e)
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
checkException
private void checkException() throws java.io.IOException- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
await
public void await()
-
-