All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.truevfs.driver.tar.bzip2.TarBZip2DriverMapModifier Maven / Gradle / Ivy

/*
 * Copyright (C) 2005-2015 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.truevfs.driver.tar.bzip2;

import java.util.Map;
import javax.annotation.concurrent.Immutable;
import net.java.truecommons.annotations.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;

/**
 * Maps a file system driver for accessing the BZIP2 compressed TAR file format.
 * The modified map will contain the following entries:
 * 

URI Schemes / Archive File Extensions File System Driver Class
{@code tar.bz2}, {@code tar.bzip2}, {@code tb2}, {@code tbz}, {@code tbz2} {@link TarBZip2Driver}
* * @author Christian Schlichtherle */ @Immutable @ServiceImplementation public final class TarBZip2DriverMapModifier extends FsDriverMapModifier { @Override public Map apply(final Map map) { final FsDriver driver = new TarBZip2Driver(); for (final String extension : new ExtensionSet("tar.bz2|tar.bzip2|tb2|tbz|tbz2")) map.put(FsScheme.create(extension), driver); return map; } /** @return -100 */ @Override public int getPriority() { return -100; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy