
net.java.truevfs.driver.zip.ZipDriverMapModifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-driver-zip Show documentation
Show all versions of truevfs-driver-zip Show documentation
Provides a file system driver for accessing the ZIP 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.
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.driver.zip;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
import net.java.truecommons.annotations.ServiceImplementation;
import net.java.truevfs.comp.zipdriver.ZipDriver;
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 ZIP file format.
* The modified map will contain the following entry:
*
URI Schemes / Archive File Extensions
File System Driver Class
{@code zip}
{@link ZipDriver}
*
* @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 ZipDriverMapModifier extends FsDriverMapModifier {
@Override
public Map apply(final Map map) {
map.put(FsScheme.create("zip"), new ZipDriver());
return map;
}
/** @return -100 */
@Override
public int getPriority() { return -100; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy