Class DefaultFileResource
java.lang.Object
org.jdrupes.builder.core.ResourceObject
org.jdrupes.builder.core.DefaultFileResource
- All Implemented Interfaces:
FileResource, IOResource, Proxyable, Resource
- Direct Known Subclasses:
DefaultJarFile
A resource that represents a file.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultFileResource(ResourceType<? extends FileResource> type, Path path) Instantiates a new file resource. -
Method Summary
Modifier and TypeMethodDescriptionasOf()The instant at which this resource was created or last modified.static <T extends FileResource>
TcreateFileResource(ResourceType<T> type, Path path) Creates a new file resource.booleaninthashCode()Returns the input stream.Returns the output stream.path()Path.toString()Methods inherited from class ResourceObject
typeMethods inherited from interface FileResource
deleteMethods inherited from interface Resource
asOfLocalized, type
-
Constructor Details
-
DefaultFileResource
Instantiates a new file resource.- Parameters:
type- the typepath- the path
-
-
Method Details
-
createFileResource
Creates a new file resource.- Type Parameters:
T- the resource type- Parameters:
type- the typepath- the path- Returns:
- the t
-
path
-
asOf
-
inputStream
Description copied from interface:IOResourceReturns the input stream.- Specified by:
inputStreamin interfaceIOResource- Returns:
- the input stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
outputStream
Description copied from interface:IOResourceReturns the output stream.- Specified by:
outputStreamin interfaceIOResource- Returns:
- the output stream
- Throws:
IOException- Signals that an I/O exception has occurred.
-
hashCode
- Overrides:
hashCodein classResourceObject
-
equals
- Overrides:
equalsin classResourceObject
-
toString
- Overrides:
toStringin classResourceObject
-