open class FileUrlResource : UrlResource, WritableResource
Subclass of UrlResource which assumes file resolution, to the degree of implementing the WritableResource interface for it.
This is the class resolved by DefaultResourceLoader for a "file:..." URL location, allowing a downcast to WritableResource for it.
Alternatively, for direct construction from a java.io.File handle, consider using FileSystemResource. For an NIO java.nio.file.Path, consider using PathResource instead.
Author
Juergen Hoeller
Since
5.0.2
FileUrlResource(url: URL)
Create a new Note that this does not enforce "file" as URL protocol. If a protocol is known to be resolvable to a file, FileUrlResource(location: String)
Create a new The given parts will automatically get encoded if necessary. |
open fun createRelative(relativePath: String): Resource |
|
open fun getOutputStream(): OutputStream |
|
open fun isWritable(): Boolean |
|
open fun writableChannel(): WritableByteChannel |