|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.io.support.EncodedResource
public class EncodedResource
Holder that combines a Resource with an encoding.
Used as argument for operations that support to read content with
a specific encoding (usually through a java.io.Reader
.
Reader
Constructor Summary | |
---|---|
EncodedResource(Resource resource)
Create a new EncodedResource for the given Resource, not specifying a specific encoding. |
|
EncodedResource(Resource resource,
String encoding)
Create a new EncodedResource for the given Resource, using the specified encoding. |
Method Summary | |
---|---|
String |
getEncoding()
Return the encoding to use for reading from the resource, or null if none specified. |
Reader |
getReader()
Open a java.io.Reader for the specified resource,
using the specified encoding (if any). |
Resource |
getResource()
Return the Resource held. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EncodedResource(Resource resource)
resource
- the Resource to holdpublic EncodedResource(Resource resource, String encoding)
resource
- the Resource to holdencoding
- the encoding to use for reading from the resourceMethod Detail |
---|
public Resource getResource()
public String getEncoding()
null
if none specified.
public Reader getReader() throws IOException
java.io.Reader
for the specified resource,
using the specified encoding (if any).
IOException
- if opening the Reader failed
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |