public interface FileLocatorAware
When loading or saving a
FileBased object using
the handler eventually invokes the
passing in a reader or writer. For some implementations this may not be
sufficient because they need information about the current location. For
instance, a concrete
FileBased implementation may have to resolve
other data sources based on relative file names which have to be interpreted
in the context of the current file location.
To deal with such scenarios, affected implementations can choose to implement
this interface. They are then passed the current location to the file being
accessed before their
write() method is called.
void initFileLocator(FileLocator locator)
FileLocatorto this object. Note that this
FileLocatorobject is only temporarily valid for the following invocation of
write(. Depending on the state of the
FileHandlerand which of its methods was called, the object may not be fully initialized. For instance, if the
load(InputStream)method was called, no file information is available, and all methods of the
FileLocatorwill return null.
locator- the current
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.