|
||||||||||
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 a specific encoding to be used for reading from the resource.
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 | |
---|---|
boolean |
equals(Object obj)
|
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. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, 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 final Resource getResource()
public final 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 failedpublic boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |