FetchContext context = hlsc.getFetchContext();
if(desperate) {
context.maxNonSplitfileRetries = -1;
context.maxSplitfileBlockRetries = -1;
}
FetchWaiter fw = new FetchWaiter(node.nonPersistentClientBulk);
get = new ClientGetter(fw, uri, context, PluginManager.PRIO, null, null, null);
try {
node.clientCore.clientContext.start(get);
} catch (PersistenceDisabledException e) {
// Impossible
}
FetchResult res = fw.waitForCompletion();
return res.asBucket().getInputStream();
} catch (FetchException e) {
if ((e.getMode() == FetchExceptionMode.PERMANENT_REDIRECT) || (e.getMode() == FetchExceptionMode.TOO_MANY_PATH_COMPONENTS)) {
uri = e.newURI;
continue;