TrueZIP File* 7.0-rc1

de.schlichtherle.truezip.file
Interface TArchiveDetector

All Superinterfaces:
FsCompositeDriver
All Known Implementing Classes:
TDefaultArchiveDetector

@Immutable
public interface TArchiveDetector
extends FsCompositeDriver

Detects prospective archive files (i.e. prospective federated file systems) solely by scanning file path names - usually by testing for file name suffixes like .zip etc.

Rather than implementing TArchiveDetector directly, please consider instantiating or subclassing the TDefaultArchiveDetector class. This class provides a map for archive file suffixes and archive drivers.

Author:
Christian Schlichtherle

Method Summary
 FsScheme getScheme(String path)
          Detects whether the given path name identifies a prospective archive file or not by applying heuristics to it and returns a scheme for accessing archive files of this type or null if the path does not denote a prospective archive file or an appropriate scheme is unknown.
 
Methods inherited from interface de.schlichtherle.truezip.fs.FsCompositeDriver
newController
 

Method Detail

getScheme

@CheckForNull
FsScheme getScheme(@NonNull
                                String path)
Detects whether the given path name identifies a prospective archive file or not by applying heuristics to it and returns a scheme for accessing archive files of this type or null if the path does not denote a prospective archive file or an appropriate scheme is unknown.

Please note that implementations must not check the actual contents of the file identified by path! This is because path may refer to a file which is not yet existing or even an entry in a federated file system, in which case there is no way to check the file contents in the parent file systems.

Parameters:
path - the path name of the file in the federated file system. This does not need to be absolute and it does not need to be accessible in its containing virtual file system!
Returns:
A scheme for accessing the archive file or null if the path does not denote an archive file (i.e. the path does not have a known suffix) or an appropriate scheme is unknown.

TrueZIP File* 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.