public abstract class AbstractMemoryReadableResource extends Object implements IReadableResource
IReadableResource that is not really a
resource but where the API does not offer alternatives. These resources
cannot be converted to a file or to a URL.| Constructor and Description |
|---|
AbstractMemoryReadableResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists() |
File |
getAsFile() |
URL |
getAsURL() |
String |
getPath() |
IReadableResource |
getReadableCloneForPath(String sPath)
Get a new resource of the same implementation type as this object but for a
different path.
|
Reader |
getReader(Charset aCharset)
Get an
Reader based on this input stream provider using the given
charset. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInputStreamgetResourceID@Nonnull public String getPath()
getPath in interface IResourceBasenull@Nullable public URL getAsURL()
getAsURL in interface IResourceBasenull
if this resource cannot be represented as an URL.@Nullable public File getAsFile()
getAsFile in interface IResourceBasenull
if this resource cannot be represented as a file.public boolean exists()
exists in interface IResourceBasetrue if the resource exists, false
otherwise.@Nullable public Reader getReader(@Nonnull Charset aCharset)
IHasInputStreamAndReaderReader based on this input stream provider using the given
charset.getReader in interface IHasInputStreamAndReaderaCharset - The charset to use. May not be null.null if no input stream could be retrieved.@Nonnull @UnsupportedOperation public IReadableResource getReadableCloneForPath(@Nonnull String sPath)
IReadableResourcegetReadableCloneForPath in interface IReadableResourcesPath - The new path to use. May not be null.null.Copyright © 2014–2015 Philip Helger. All rights reserved.