public interface ArchiveRootProvider
FileUtil.isArchiveArtifact
, FileUtil.isArchiveFile
,
FileUtil.getArchiveRoot
, FileUtil.getArchiveFile
.
The implementations are registered in global lookup.Modifier and Type | Method and Description |
---|---|
default FileObject |
getArchiveFile(FileObject fo)
Returns a FileObject representing an archive file containing the
FileObject given by the parameter.
|
URL |
getArchiveFile(URL url)
Returns the URL of the archive file containing the file
referred to by a archive-protocol URL.
|
default FileObject |
getArchiveRoot(FileObject fo)
Returns a FileObject representing the root folder of an archive.
|
URL |
getArchiveRoot(URL url)
Returns an URL representing the root of an archive.
|
default boolean |
isArchiveArtifact(FileObject fo)
Tests if an file is inside an archive.
|
boolean |
isArchiveArtifact(URL url)
Tests if an
URL denotes a file inside an archive. |
default boolean |
isArchiveFile(FileObject fo,
boolean strict)
Tests if a file represents an java archive.
|
boolean |
isArchiveFile(URL url,
boolean strict)
Tests if a file represents an java archive.
|
boolean isArchiveFile(URL url, boolean strict)
url
- the file to be testedstrict
- when false the detection may not be precise, for example
an empty archive missing the archive header is treated as an archivedefault boolean isArchiveFile(FileObject fo, boolean strict)
isArchiveFile(URL, boolean)
,
it can be overridden by an implementation in more efficient way.fo
- the file to be testedstrict
- when false the detection may not be precise, for example
an empty archive missing the archive header is treated as an archiveboolean isArchiveArtifact(URL url)
URL
denotes a file inside an archive.url
- the url to be testeddefault boolean isArchiveArtifact(FileObject fo)
isArchiveArtifact(URL)
,
it can be overridden by an implementation in more efficient way.fo
- the file to be testedURL getArchiveFile(URL url)
url
- a URL!/
default FileObject getArchiveFile(FileObject fo)
getArchiveFile(URL)
,
it can be overridden by an implementation in more efficient way.fo
- a file in a archive filesystemfo
is not an archive entryURL getArchiveRoot(URL url)
#isArchiveFile(URL)
to determine if the URL
refers to an archive file.url
- of an java archive filedefault FileObject getArchiveRoot(FileObject fo)
#isArchiveFile(FileObject)
to determine
if the file object refers to an archive file.
The default implementation delegates to getArchiveRoot(URL)
,
it can be overridden by an implementation in more efficient way.fo
- an java archive fileBuilt on June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.