get(fo).waitForOutputStreamsClosed(fo, 2000) ) { retVal = new NotifyOutputStream(fo, fireFileChanged); get(fo).oStream().add(retVal); get(fo.getFileSystem()).oStream().add(retVal);
nos = (NotifyOutputStream) itOs.next(); Exception annotation = nos.getException();
get (fo).waitForOutputStreamsClosed(2000); retVal = new NotifyOutputStream (fo, fireFileChanged); get (fo).oStream ().add (retVal); get (fo.getFileSystem()).oStream ().add (retVal);
get (fo).waitForOutputStreamsClosed(2000); retVal = new NotifyOutputStream (fo, fireFileChanged); get (fo).oStream ().add (retVal); get (fo.getFileSystem()).oStream ().add (retVal);
/** * Annotates ex with all exceptions of unclosed streams. * @param ex that should be annotated */ public void annotate (Exception ex) { if (!ANNOTATE_UNCLOSED_STREAMS) { return; } synchronized (StreamPool.class) { if (iStreams != null) { Iterator itIs = iStreams.iterator (); NotifyInputStream nis; while (itIs.hasNext()) { nis = (NotifyInputStream) itIs.next(); Exception annotation = nis.getException (); if (annotation != null) ExternalUtil.annotate (ex,annotation); } } if (oStreams != null) { Iterator itOs = oStreams.iterator (); NotifyOutputStream nos; while (itOs.hasNext()) { nos = (NotifyOutputStream) itOs.next(); Exception annotation = nos.getException (); if (annotation != null) ExternalUtil.annotate (ex,annotation); } } } }
/** * Annotates ex with all exceptions of unclosed streams. * @param ex that should be annotated */ public void annotate (Exception ex) { if (!ANNOTATE_UNCLOSED_STREAMS) { return; } synchronized (StreamPool.class) { if (iStreams != null) { Iterator itIs = iStreams.iterator (); NotifyInputStream nis; while (itIs.hasNext()) { nis = (NotifyInputStream) itIs.next(); Exception annotation = nis.getException (); if (annotation != null) ExternalUtil.annotate (ex,annotation); } } if (oStreams != null) { Iterator itOs = oStreams.iterator (); NotifyOutputStream nos; while (itOs.hasNext()) { nos = (NotifyOutputStream) itOs.next(); Exception annotation = nos.getException (); if (annotation != null) ExternalUtil.annotate (ex,annotation); } } } }