net.java.truevfs.driver.sfx.SfxDriverMapModifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-driver-sfx Show documentation
Show all versions of truevfs-driver-sfx Show documentation
Provides a file system driver for read-only access to the SelF eXtracting ZIP file format, alias SFX. 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.
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.driver.sfx;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
import net.java.truecommons.annotations.ServiceImplementation;
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 read-only access to the SelF eXtracting ZIP
* file format, alias SFX.
* The modified map will contain the following entries:
*
URI Schemes / Archive File Extensions
File System Driver Class
{@code exe}
{@link ReadOnlySfxDriver}
*
* @see Open Document Format for Office Applications (OpenDocument) Version 1.2; Part 1: OpenDocument Schema; Appendix C: MIME Types and File Name Extensions (Non Normative)
* @author Christian Schlichtherle
*/
@Immutable
@ServiceImplementation
public final class SfxDriverMapModifier extends FsDriverMapModifier {
@Override
public Map apply(final Map map) {
map.put(FsScheme.create("exe"), new ReadOnlySfxDriver());
return map;
}
/** @return -100 */
@Override
public int getPriority() { return -100; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy