{
for (InputStream is : e.getValue())
{
ByteArrayOutputStream os = new ByteArrayOutputStream();
layers.put(e.getKey(), os);
StreamConnector splitter = new StreamConnector("input collector: "+getClass().getName(), is, os);
splitters.add(splitter);
splitter.start();
}
}
IOException ex = null;
for (StreamConnector splitter : splitters)
{
ThreadUtils.waitForThread(splitter);
if (splitter.getException() != null)
ex = splitter.getException();
}
if (ex != null)
throw ex;