Package org.ec4j.core
Interface Resource
- All Known Implementing Classes:
Resource.Resources.ClassPathResource,Resource.Resources.PathResource,Resource.Resources.StringResource
public interface Resource
A file in filesystem like
Resource hierarchies. The implementations must override Object.hashCode()
and Object.equals(Object)-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn enum of Byte Order Marks (BOMs) to be able to support encodings with BOM unsupported byCharset.forName(String).static classA host ofResource.Charsets.forName(String).static interfaceA readed allowing to access a character on any offset in the underlying resource.static class -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()getPath()Opens aResource.RandomReaderto read the content of thisResource.
-
Method Details
-
exists
boolean exists()- Returns:
trueif thisResourceexists; otherwisefalse
-
getParent
ResourcePath getParent()- Returns:
- the
ResourcePathof the parent of thisResourceornullif thisResourcehas no parent
-
getPath
Ec4jPath getPath() -
openRandomReader
Opens aResource.RandomReaderto read the content of thisResource.- Returns:
- an open
Resource.RandomReader - Throws:
IOException- on I/O problems
-
openReader
- Returns:
- an open
Reader - Throws:
IOException- on I/O problems
-