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
This commit is contained in:
Mike Thomas
2008-05-29 23:45:29 +00:00
parent 2381ec5640
commit 3839762bc8
@@ -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();