- All Superinterfaces:
Serializable
- All Known Subinterfaces:
FileReaderWriter
- All Known Implementing Classes:
ClassPathLoader,FileSystemLoader,UrlLoader
Wraps different ways file loading: FileSystem (absolute), Classpath,..
The implementations must be reentrant regarding inputStream()
- Author:
- Oliver Wolff
-
Method Summary
Modifier and TypeMethodDescriptiongetURL()This method should be within atry-with-resourcesstatement as it is not closed by the implementation.booleanboolean
-
Method Details
-
isReadable
boolean isReadable()- Returns:
- boolean indicating whether the concrete file exists and is accessible
-
getFileName
- Returns:
- the filename in an appropriate presentation.
-
inputStream
This method should be within atry-with-resourcesstatement as it is not closed by the implementation.- Returns:
- an
InputStreamon the corresponding file. It implicitly checksisReadable()before accessing the file and will throw anIllegalStateExceptionin case it is not readable. - Throws:
IOException
-
getURL
- Returns:
- an
URLon the corresponding file.
-
isFilesystemLoader
boolean isFilesystemLoader()- Returns:
- boolean indicating that the loader loads from the file-system and not from the classpath
-