}
monitor.subTask("Waiting for archive...");
while (!collector.hasReceived()) {
if (monitor.isCanceled()) {
throw new LocalCancellationException();
}
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new LocalCancellationException();
}
}
monitor.subTask("Receiving archive...");
try {
IncomingTransferObject result = incomingExtProv.getPayload(receive(
monitor.newChild(packetListenerIBB == null ? 10 : 1),
collector, 10000, forceWait));
if (monitor.isCanceled()) {
result.reject();
throw new LocalCancellationException();
}
byte[] data = result.accept(monitor
.newChild(packetListenerIBB == null ? 90 : 9));
return new ByteArrayInputStream(data);