public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
openFile(Path fileToOpen,
DataHandlerRegistry dataHandlerRegistry,
FileExtensionDescriptorRegistry fileExtensionDescriptorRegistry,
DocumentHandlerDescriptorRegistry documentHandlerDescriptorRegistry,
ContextManager contextManager,
ContextInjector contextInjector)
Opens a file.
|
public static void openFile(Path fileToOpen, DataHandlerRegistry dataHandlerRegistry, FileExtensionDescriptorRegistry fileExtensionDescriptorRegistry, DocumentHandlerDescriptorRegistry documentHandlerDescriptorRegistry, ContextManager contextManager, ContextInjector contextInjector)
DataHandlerRegistry
if there is already a registered DataHandler
for the specified file path and uses it if available. FileExtensionDescriptorRegistry
if there is any registered FileExtensionDescriptor
for the file extension of the file to open. If one is registered this method then looks looks in the DocumentHandlerDescriptorRegistry
if there is any DocumentHandlerDescriptor
for the associated MIME type. It then tries to create a DataHandler for the specified file path and register it in the DataHandlerRegistry. Openable
registered in the local Context
of the DataHandler. If it finds an Openable it calls
Openable.open()
.fileToOpen
- the path to the file to open.dataHandlerRegistry
- the data handler registryfileExtensionDescriptorRegistry
- the file extension descriptor registrydocumentHandlerDescriptorRegistry
- the document handler descriptor registrycontextManager
- the context managercontextInjector
- the context injectorOpenable.open()
Copyright © 2012–2018 Drombler. All rights reserved.