From 3839762bc88eb3df0b8353ecbffbe045d40d1411 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Thu, 29 May 2008 23:45:29 +0000 Subject: [PATCH] Split out the actual loading from a particular URL to a static function we may want to call from other places. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@516 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/resource/NetworkResourceBundle.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java/com/threerings/resource/NetworkResourceBundle.java b/src/java/com/threerings/resource/NetworkResourceBundle.java index c1d0b4d0..206b2cec 100644 --- a/src/java/com/threerings/resource/NetworkResourceBundle.java +++ b/src/java/com/threerings/resource/NetworkResourceBundle.java @@ -73,6 +73,11 @@ public class NetworkResourceBundle extends ResourceBundle } URL resourceUrl = new URL(_bundleURL, path); + return getResource(resourceUrl); + } + + protected static InputStream getResource(URL resourceUrl) + { URLConnection ucon = null; try { ucon = resourceUrl.openConnection(); @@ -83,6 +88,7 @@ public class NetworkResourceBundle extends ResourceBundle if (ucon == null) { return null; } + try { ucon.connect(); return ucon.getInputStream();