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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user