20 package net.sf.gridarta.utils;
22 import java.io.CharArrayWriter;
23 import java.io.IOException;
24 import java.io.Reader;
25 import org.jetbrains.annotations.NotNull;
26 import org.jetbrains.annotations.Nullable;
45 private final Object
sync =
new Object();
68 private final Runnable
runnable =
new Runnable() {
72 final char[] buf =
new char[1024];
73 while (!Thread.currentThread().isInterrupted()) {
75 final int len =
reader.read(buf);
85 }
catch (
final IOException ex) {
127 synchronized (
sync) {
129 if (this.failure ==
null) {
141 synchronized (
sync) {
154 synchronized (
sync) {
166 public void join() throws InterruptedException {