Methods Summary |
---|
private synchronized void | close()
try {
dieIfClosed();
out.close();
} finally {
closed = true;
}
|
private synchronized void | dieIfClosed()
if (closed) {
throw new IOException("The funneled OutputStream has been closed.");
}
|
public synchronized java.io.OutputStream | getFunnelInstance()Get a "funnel" OutputStream instance to
write to this OutputStreamFunneler 's underlying
OutputStream .
dieIfClosed();
try {
return new Funnel();
} finally {
notifyAll();
}
|
private synchronized void | release(org.apache.tools.ant.util.OutputStreamFunneler$Funnel funnel)
//ignore release of an already-closed funnel
if (!funnel.closed) {
try {
if (timeoutMillis > 0) {
try {
wait(timeoutMillis);
} catch (InterruptedException eyeEx) {
//ignore
}
}
if (--count == 0) {
close();
}
} finally {
funnel.closed = true;
}
}
|
public synchronized void | setTimeout(long timeoutMillis)Set the timeout for this OutputStreamFunneler .
This is the maximum time that may elapse between the closure
of the last "funnel" and the next call to
getOutputStream() without closing the
underlying stream.
this.timeoutMillis = timeoutMillis;
|