X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fsrc%2Forg%2Fwamblee%2Fio%2FClassPathResource.java;h=32014a1095dbd448a44784f6cb00f4264994a1c2;hb=14df90d103ad9292137c4a250a01a257c2a3fe17;hp=23c894178f1264ab2a512d2db59f6beb6caaca81;hpb=caa126385642ffc57478e928ab871bc09c53e993;p=utils diff --git a/support/src/org/wamblee/io/ClassPathResource.java b/support/src/org/wamblee/io/ClassPathResource.java index 23c89417..32014a10 100644 --- a/support/src/org/wamblee/io/ClassPathResource.java +++ b/support/src/org/wamblee/io/ClassPathResource.java @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.io; import java.io.IOException; @@ -29,28 +29,35 @@ public class ClassPathResource implements InputResource { /** * Construct the class path resource. - * @param aResource Resource + * + * @param aResource + * Resource */ - public ClassPathResource( String aResource ) { + public ClassPathResource(String aResource) { _resource = aResource; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.wamblee.io.InputResource#getInputStream() */ - public InputStream getInputStream( ) throws IOException { - InputStream stream = Thread.currentThread( ).getContextClassLoader( ) - .getResourceAsStream( _resource ); - if ( stream == null ) { - throw new IOException("Class path resource '" + _resource + "' not found."); + public InputStream getInputStream() throws IOException { + InputStream stream = Thread.currentThread().getContextClassLoader() + .getResourceAsStream(_resource); + if (stream == null) { + throw new IOException("Class path resource '" + _resource + + "' not found."); } - return stream; + return stream; } - - /** (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ - public String toString( ) { + public String toString() { return "ClassPathResource(" + _resource + ")"; } }