X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FStringResource.java;h=2f5cbb5d12b1d55cfd4732445c74f1d6e68cd876;hb=96c8961955a306314dfe0cf9ca192252de39fc1c;hp=3f9a7919aeaadf6135d148374669b62dcfa5132c;hpb=7526813969742844aefbd25e8a4a056985dc7f65;p=utils diff --git a/system/spring/src/main/java/org/wamblee/system/spring/StringResource.java b/system/spring/src/main/java/org/wamblee/system/spring/StringResource.java index 3f9a7919..2f5cbb5d 100644 --- a/system/spring/src/main/java/org/wamblee/system/spring/StringResource.java +++ b/system/spring/src/main/java/org/wamblee/system/spring/StringResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2007 the original author or authors. + * Copyright 2005-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,60 +15,68 @@ */ package org.wamblee.system.spring; +import org.springframework.core.io.Resource; + import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.net.URL; -import org.springframework.core.io.Resource; +import java.net.URL; +/** + * + * @author $author$ + * @version $Revision$ + */ class StringResource implements Resource { - - private String _value; - - public StringResource(String aValue) { - _value = aValue; - } + private String value; - @Override - public Resource createRelative(String aRelativePath) throws IOException { - throw new IOException("No relative resource possible"); - } + /** + * Creates a new StringResource object. + * + */ + public StringResource(String aValue) { + value = aValue; + } - @Override - public boolean exists() { - return false; - } + @Override + public Resource createRelative(String aRelativePath) throws IOException { + throw new IOException("No relative resource possible"); + } - @Override - public String getDescription() { - return "Properties of a spring component"; - } + @Override + public boolean exists() { + return false; + } - @Override - public File getFile() throws IOException { - throw new IOException(); - } + @Override + public String getDescription() { + return "Properties of a spring component"; + } - @Override - public String getFilename() { - return "springcomponent.properties"; - } + @Override + public File getFile() throws IOException { + throw new IOException(); + } - @Override - public URL getURL() throws IOException { - throw new IOException(); - } + @Override + public String getFilename() { + return "springcomponent.properties"; + } - @Override - public boolean isOpen() { - return false; - } + @Override + public URL getURL() throws IOException { + throw new IOException(); + } - @Override - public InputStream getInputStream() throws IOException { - return new ByteArrayInputStream(_value.getBytes()); - } + @Override + public boolean isOpen() { + return false; + } + @Override + public InputStream getInputStream() throws IOException { + return new ByteArrayInputStream(value.getBytes()); + } }