public static final class FileLocator.FileLocatorBuilder extends Object
FileLocator
objects. An instance of this class is returned by the
fileLocator()
method of {link FileLocatorUtils}. It can be used
to define the various components of the FileLocator
object. By
calling create()
the new immutable FileLocator
instance
is created.Modifier and Type | Method and Description |
---|---|
FileLocator.FileLocatorBuilder |
basePath(String path)
Specifies the base path of the new
FileLocator . |
FileLocator |
create()
Creates a new immutable
FileLocatorImpl object based on the
properties set so far for this builder. |
FileLocator.FileLocatorBuilder |
encoding(String enc)
Specifies the encoding of the new
FileLocator . |
FileLocator.FileLocatorBuilder |
fileName(String name)
Specifies the file name of the new
FileLocator . |
FileLocator.FileLocatorBuilder |
fileSystem(FileSystem fs)
Specifies the
FileSystem of the new FileLocator . |
FileLocator.FileLocatorBuilder |
locationStrategy(FileLocationStrategy strategy)
Specifies the
FileLocationStrategy to be used when the
referenced file is to be located. |
FileLocator.FileLocatorBuilder |
sourceURL(URL url)
Specifies the source URL of the new
FileLocator . |
public FileLocator.FileLocatorBuilder encoding(String enc)
FileLocator
.enc
- the encodingpublic FileLocator.FileLocatorBuilder fileSystem(FileSystem fs)
FileSystem
of the new FileLocator
.fs
- the FileSystem
public FileLocator.FileLocatorBuilder basePath(String path)
FileLocator
.path
- the base pathpublic FileLocator.FileLocatorBuilder fileName(String name)
FileLocator
.name
- the file namepublic FileLocator.FileLocatorBuilder sourceURL(URL url)
FileLocator
.url
- the source URLpublic FileLocator.FileLocatorBuilder locationStrategy(FileLocationStrategy strategy)
FileLocationStrategy
to be used when the
referenced file is to be located.strategy
- the FileLocationStrategy
public FileLocator create()
FileLocatorImpl
object based on the
properties set so far for this builder.FileLocator
objectCopyright © 2001–2020 The Apache Software Foundation. All rights reserved.