public class StringResource extends AbstractResourceBase
Constructor and Description |
---|
StringResource(String content,
URI uri) |
StringResource(String content,
URI uri,
long lastModified) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Returns a
InputStream object for the resource if the resource
is not a directory/folder resource. |
Reader |
getReader()
Returns a
Reader object for the resource if the resource is not a
directory/folder resource. |
long |
getSize()
Returns the size of the content for this resource.
|
long |
lastModified()
Returns the last-modified date of the resource.
|
String |
toString() |
asVisitorResource, exists, getPath, getReferenceURI, getURI, isFolder, resolve, setReferenceURI, walkTree
public long lastModified()
IResource
lastModified
in interface IResource
lastModified
in class AbstractResourceBase
public long getSize()
IResource
IOException
is thrown.getSize
in interface IResource
getSize
in class AbstractResourceBase
public Reader getReader() throws IOException
IResource
Reader
object for the resource if the resource is not a
directory/folder resource.IOException
- if the resource is a folder, or an I/O error occurredpublic InputStream getInputStream() throws IOException
IResource
InputStream
object for the resource if the resource
is not a directory/folder resource.IOException
- if the resource is a folder, or an I/O error occurredCopyright © 2011-2015 IBM. All Rights Reserved.