java.lang.Object
uk.autores.handling.Resource
- All Implemented Interfaces:
CharSequence
A representation of the annotated resource.
The
CharSequence
implementation is the path.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
For retrieving resource contents. -
Constructor Summary
ConstructorDescriptionResource
(Resource.ResourceOpener file, String path) All arguments must be non-null. -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) int
length()
open()
Opens resource for reading.subSequence
(int start, int end) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
Resource
All arguments must be non-null.- Parameters:
file
- resource bytespath
- as defined inResourceFiles.value()
-
-
Method Details
-
open
Opens resource for reading.- Returns:
- contents
- Throws:
IOException
- on I/O error- See Also:
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
- Returns:
- path passed to the constructor
-