
net.java.truevfs.driver.tar.xz.TarXZDriverMapModifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-driver-tar-xz Show documentation
Show all versions of truevfs-driver-tar-xz Show documentation
Provides a file system driver for accessing the XZ compressed TAR
file format.
Add the JAR artifact of this module to the run time class path to
make its file system drivers available for service location in the
client API modules.
The newest version!
/*
* Copyright © 2005 - 2021 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.driver.tar.xz;
import global.namespace.service.wight.annotation.ServiceImplementation;
import net.java.truecommons.shed.ExtensionSet;
import net.java.truevfs.kernel.spec.FsDriver;
import net.java.truevfs.kernel.spec.FsScheme;
import net.java.truevfs.kernel.spec.spi.FsDriverMapModifier;
import javax.annotation.concurrent.Immutable;
import java.util.Map;
/**
* Maps a file system driver for accessing the XZ compressed TAR file format.
* The modified map will contain the following entries:
*
*
*
*
* URI Schemes / Archive File Extensions
* File System Driver Class
*
*
*
*
* {@code tar.xz}, {@code txz}
* {@link TarXZDriver}
*
*
*
*
* @author Christian Schlichtherle
*/
@Immutable
@ServiceImplementation(priority = -100)
public final class TarXZDriverMapModifier implements FsDriverMapModifier {
@Override
public Map apply(final Map map) {
final FsDriver driver = new TarXZDriver();
new ExtensionSet("tar.xz|txz").forEach(e -> map.put(FsScheme.create(e), driver));
return map;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy