1 package org.wamblee.system.spring;
3 import java.io.ByteArrayInputStream;
5 import java.io.IOException;
6 import java.io.InputStream;
9 import org.springframework.core.io.Resource;
11 class StringResource implements Resource {
13 private String _value;
15 public StringResource(String aValue) {
20 public Resource createRelative(String aRelativePath) throws IOException {
21 throw new IOException("No relative resource possible");
25 public boolean exists() {
30 public String getDescription() {
31 return "Properties of a spring component";
35 public File getFile() throws IOException {
36 throw new IOException();
40 public String getFilename() {
41 return "springcomponent.properties";
45 public URL getURL() throws IOException {
46 throw new IOException();
50 public boolean isOpen() {
55 public InputStream getInputStream() throws IOException {
56 return new ByteArrayInputStream(_value.getBytes());