Interface FileFinder
- All Known Subinterfaces:
- StaticFiles
- All Known Implementing Classes:
- BasicFileFinder,- BasicStaticFiles,- FileFinder.Void,- StaticFiles.Void
Example:
   
 If the 
- "MyResource_ja_JP.txt" 
- "MyResource_ja.txt" 
- "MyResource.txt" 
 The default implementation of this interface is BasicFileFinder.
 The FileFinder.Builder.type(Class) method is provided for instantiating other instances.
 
Example:
   
Subclasses must provide a public constructor that takes in any of the following arguments:
- FileFinder.Builder- The builder object.
- Any beans present in the bean store passed into the constructor.
- Any Optionalbeans optionally present in bean store passed into the constructor.
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classBuilder class.static classRepresents no file finder
- 
Method SummaryModifier and TypeMethodDescriptionstatic FileFinder.Buildercreate()Static creator.static FileFinder.BuilderStatic creator.Returns the contents of the resource with the specified name.Returns the file with the specified name as a string.
- 
Method Details- 
createStatic creator.- Parameters:
- beanStore- The bean store to use for creating beans.
- Returns:
- A new builder for this object.
 
- 
createStatic creator.- Returns:
- A new builder for this object.
 
- 
getStreamReturns the contents of the resource with the specified name.- Parameters:
- name- The resource name. See- Class.getResource(String)for format.
- locale- The locale of the resource to retrieve.
 If- null , won't look for localized file names.
- Returns:
- The resolved resource contents, or null if the resource was not found.
- Throws:
- IOException- Thrown by underlying stream.
 
- 
getStringReturns the file with the specified name as a string.- Parameters:
- name- The file name.
- locale- The locale of the resource to retrieve.
 If- null , won't look for localized file names.
- Returns:
- The contents of the file as a string. Assumes UTF-8 encoding.
- Throws:
- IOException- If file could not be read.
 
 
-