public static final class FileLocator.FileLocatorBuilder
extends java.lang.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 | Description |
|---|---|---|
FileLocator.FileLocatorBuilder |
basePath(java.lang.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(java.lang.String enc) |
Specifies the encoding of the new
FileLocator. |
FileLocator.FileLocatorBuilder |
fileName(java.lang.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(java.net.URL url) |
Specifies the source URL of the new
FileLocator. |
public FileLocator.FileLocatorBuilder encoding(java.lang.String enc)
FileLocator.enc - the encodingpublic FileLocator.FileLocatorBuilder fileSystem(FileSystem fs)
FileSystem of the new FileLocator.fs - the FileSystempublic FileLocator.FileLocatorBuilder basePath(java.lang.String path)
FileLocator.path - the base pathpublic FileLocator.FileLocatorBuilder fileName(java.lang.String name)
FileLocator.name - the file namepublic FileLocator.FileLocatorBuilder sourceURL(java.net.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 FileLocationStrategypublic FileLocator create()
FileLocatorImpl object based on the
properties set so far for this builder.FileLocator objectCopyright © 2001–2018. All rights reserved.