From c7e80de26d51f7a3b2659be4be6e9c258d046238 Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Fri, 30 Mar 2012 11:08:36 -0700 Subject: [PATCH] Revert "Revert "Code formatting and method rearrangement."" This reverts commit cc0c9c4e3e6a3b41afd47cb9fc37b1b5d4331aee. I'm reverting the reverting. I wanted these changes, just not all that other -whateverthefuck- that piggybacked in. --- .../threerings/resource/ResourceManager.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/com/threerings/resource/ResourceManager.java b/core/src/main/java/com/threerings/resource/ResourceManager.java index 5e4d754e..e1d060f6 100644 --- a/core/src/main/java/com/threerings/resource/ResourceManager.java +++ b/core/src/main/java/com/threerings/resource/ResourceManager.java @@ -838,8 +838,8 @@ public class ResourceManager /** * Creates an appropriate bundle for fetching resources from files. */ - protected FileResourceBundle createFileResourceBundle (File source, boolean delay, - boolean unpack) + protected FileResourceBundle createFileResourceBundle ( + File source, boolean delay, boolean unpack) { return new FileResourceBundle(source, delay, unpack); } @@ -847,12 +847,24 @@ public class ResourceManager /** * Creates an appropriate bundle for fetching resources from the network. */ - protected ResourceBundle createNetworkResourceBundle (String root, String path, - Set rsrcList) + protected ResourceBundle createNetworkResourceBundle ( + String root, String path, Set rsrcList) { return new NetworkResourceBundle(root, path, rsrcList); } + /** + * Returns an InputStream from this manager's classloader for the given path. + */ + protected InputStream getInputStreamFromClasspath (final String fullyQualifiedPath) + { + return AccessController.doPrivileged(new PrivilegedAction() { + public InputStream run () { + return _loader.getResourceAsStream(fullyQualifiedPath); + } + }); + } + /** * Transform the path into a locale-specific one, or return null. */ @@ -876,18 +888,6 @@ public class ResourceManager return ImageIO.read(file); } - /** - * Returns an InputStream from this manager's classloader for the given path. - */ - protected InputStream getInputStreamFromClasspath (final String fullyQualifiedPath) - { - return AccessController.doPrivileged(new PrivilegedAction() { - public InputStream run () { - return _loader.getResourceAsStream(fullyQualifiedPath); - } - }); - } - /** * Loads an image from the given input stream. Supports formats supported by {@link ImageIO} * as well as {@link FastImageIO} based on the useFastIO param.