Package org.ec4j.core
Class Resource.Resources.PathResource
java.lang.Object
org.ec4j.core.Resource.Resources.PathResource
- All Implemented Interfaces:
Resource
- Enclosing class:
Resource.Resources
A
Resource implementation based on java.nio.file.Path. To create a new instance use
Resource.Resources.ofPath(Path, Charset).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ec4j.core.Resource
Resource.Bom, Resource.Charsets, Resource.RandomReader, Resource.Resources -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
encoding
-
path
-
-
Constructor Details
-
PathResource
-
-
Method Details
-
equals
-
exists
public boolean exists() -
getParent
- Specified by:
getParentin interfaceResource- Returns:
- the
ResourcePathof the parent of thisResourceornullif thisResourcehas no parent
-
getPath
-
hashCode
public int hashCode() -
openRandomReader
Opens aResource.RandomReaderto read the content of thisResource.- Specified by:
openRandomReaderin interfaceResource- Returns:
- an open
Resource.RandomReader - Throws:
IOException- on I/O problems
-
openReader
- Specified by:
openReaderin interfaceResource- Returns:
- an open
Reader - Throws:
IOException- on I/O problems
-
toString
-