byte[] content = out.toByteArray();
if (jarEntryContents.containsKey( url.toString() )) {
if (!collisionAllowed)
throw new JclException( "Resource " + url.toString() + " already loaded" );
else {
if (logger.isLoggable( Level.FINEST ))
logger.finest( "Resource " + url.toString() + " already loaded; ignoring entry..." );
return;
}
}
if (logger.isLoggable( Level.FINEST ))
logger.finest( "Loading remote resource." );
jarEntryContents.put( url.toString(), content );
} catch (IOException e) {
throw new JclException( e );
} finally {
if (out != null)
try {
out.close();
} catch (IOException e) {
throw new JclException( e );
}
if (stream != null)
try {
stream.close();
} catch (IOException e) {
throw new JclException( e );
}
}
}