public class ResourceInputSource extends InputSource
Constructor and Description |
---|
ResourceInputSource(File file)
Creates a ResourceInputSource for the given
File |
ResourceInputSource(InputStream byteStream)
Creates a ResourceInputSource for the given
InputStream |
ResourceInputSource(org.springframework.core.io.InputStreamSource streamSource)
Creates a ResourceInputSource for the given
InputStreamSource |
ResourceInputSource(InputStream byteStream,
String fileName)
Creates a ResourceInputSource for the given
InputStreamSource and name |
ResourceInputSource(org.springframework.core.io.Resource resource)
Creates a ResourceInputSource for the given
Resource |
ResourceInputSource(URL url)
Creates a ResourceInputSource for the given
URL |
Modifier and Type | Method and Description |
---|---|
SAXSource |
asSAXSource()
Returns this instance wrapped as a
SAXSource |
File |
getFile()
Return the associated file, if any
|
String |
getFileName()
Returns the file name for this
InputSource instance, if any |
org.springframework.core.io.Resource |
getResource()
Return the associated Resource, if any
|
org.springframework.core.io.InputStreamSource |
getStreamSource()
Return the associated
InputStreamSource , if any |
void |
setByteStream(InputStream byteStream) |
void |
setCharacterStream(Reader reader)
This method from
InputSource is Unsupported |
void |
setPublicId(String publicId)
This method from
InputSource is Unsupported |
void |
setSystemId(String systemId)
This method from
InputSource is Unsupported |
getByteStream, getCharacterStream, getEncoding, getPublicId, getSystemId, setEncoding
public ResourceInputSource(URL url) throws IOException
URL
url
- The URL whose contents will be parsedIOException
- Indicates a problem accessing the URLpublic ResourceInputSource(org.springframework.core.io.InputStreamSource streamSource) throws IOException
InputStreamSource
streamSource
- The InputStreamSource to be parsedIOException
- Indicates a problem in accessing the underlying streampublic ResourceInputSource(org.springframework.core.io.Resource resource) throws IOException
Resource
resource
- The Resource to be parsedIOException
- Indicates a problem in accessing the actual resourcepublic ResourceInputSource(InputStream byteStream)
InputStream
byteStream
- The byte stream to be parsedpublic ResourceInputSource(InputStream byteStream, String fileName)
InputStreamSource
and namebyteStream
- The byte stream to be parsedfileName
- The file name for the filepublic ResourceInputSource(File file)
File
file
- The file to be parsedpublic void setByteStream(InputStream byteStream)
setByteStream
in class InputSource
public String getFileName()
InputSource
instance, if anypublic org.springframework.core.io.InputStreamSource getStreamSource()
InputStreamSource
, if anypublic org.springframework.core.io.Resource getResource()
public SAXSource asSAXSource()
SAXSource
SAXSource
public void setCharacterStream(Reader reader)
InputSource
is UnsupportedsetCharacterStream
in class InputSource
public void setPublicId(String publicId)
InputSource
is UnsupportedsetPublicId
in class InputSource
public void setSystemId(String systemId)
InputSource
is UnsupportedsetSystemId
in class InputSource
Copyright © 2010–2018 Jadira Systems. All rights reserved.