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

de.schlichtherle.truezip.fs.archive.zip.ZipDriverService Maven / Gradle / Ivy

Go to download

The file system driver family for ZIP and related archive file types. 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.

There is a newer version: 7.7.10
Show newest version
/*
 * Copyright (C) 2005-2013 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package de.schlichtherle.truezip.fs.archive.zip;

import de.schlichtherle.truezip.fs.FsDriver;
import de.schlichtherle.truezip.fs.FsScheme;
import de.schlichtherle.truezip.fs.spi.FsDriverService;
import de.schlichtherle.truezip.socket.sl.IOPoolLocator;
import java.util.Map;
import javax.annotation.concurrent.Immutable;

/**
 * An immutable container of a map of drivers for the ZIP file format.
 * The map provided by this service consists of the following entries:
 * 

URI Schemes / Archive File Suffixes File System Driver Class
{@code ear}, {@code jar}, {@code war} {@link de.schlichtherle.truezip.fs.archive.zip.JarDriver}
{@code exe} {@link de.schlichtherle.truezip.fs.archive.zip.ReadOnlySfxDriver}
{@code odt}, {@code ott}, {@code odg}, {@code otg}, {@code odp}, {@code otp}, {@code ods}, {@code ots}, {@code odc}, {@code otc}, {@code odi}, {@code oti}, {@code odf}, {@code otf}, {@code odm}, {@code oth}, {@code odb} {@link de.schlichtherle.truezip.fs.archive.zip.OdfDriver}
{@code zip} {@link de.schlichtherle.truezip.fs.archive.zip.ZipDriver}
*

* Note that the regular expression is actually decomposed into separate * {@link FsScheme} objects which get mapped individually. * * @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 public final class ZipDriverService extends FsDriverService { private static final Map DRIVERS = newMap(new Object[][] { { "zip", new ZipDriver(IOPoolLocator.SINGLETON) }, { "ear|jar|war", new JarDriver(IOPoolLocator.SINGLETON) }, { "odt|ott|odg|otg|odp|otp|ods|ots|odc|otc|odi|oti|odf|otf|odm|oth|odb", new OdfDriver(IOPoolLocator.SINGLETON) }, { "exe", new ReadOnlySfxDriver(IOPoolLocator.SINGLETON) }, }); @Override public Map get() { return DRIVERS; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy