亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? classpathentry.java

?? jsr170接口的java實現。是個apache的開源項目。
?? JAVA
字號:
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.jackrabbit.classloader;import java.io.IOException;import java.io.InputStream;import java.net.MalformedURLException;import java.net.URL;import java.security.AccessControlException;import java.util.jar.JarException;import java.util.jar.JarInputStream;import javax.jcr.ItemNotFoundException;import javax.jcr.PathNotFoundException;import javax.jcr.Property;import javax.jcr.RepositoryException;import javax.jcr.Session;import org.apache.jackrabbit.net.URLFactory;import org.slf4j.Logger;import org.slf4j.LoggerFactory;/** * The <code>ClassPathEntry</code> class encapsulates entries in the class path * of the {@link DynamicRepositoryClassLoader}. The main task is to retrieve * {@link ClassLoaderResource} instances for classes or resources to load from it. * <p> * This implementation is not currently integrated with Java security. That is * protection domains and security managers are not supported yet. * <p> * This class is not intended to be subclassed or instantiated by clients. * * @author Felix Meschberger * @version $Rev$, $Date: 2007-03-05 14:26:38 +0200 (Mon, 05 Mar 2007) $ */abstract class ClassPathEntry {    /** default logging */    private static final Logger log =        LoggerFactory.getLogger(ClassPathEntry.class);    /** The session assigned to this class path entry */    protected final Session session;    /** The path to the item of this class path entry */    protected final String path;    /** The base URL for the class path entry to later construct resource URLs */    protected URL baseURL;    //---------- construction --------------------------------------------------    /**     * Creates an instance of the <code>ClassPathEntry</code> assigning the     * session and path.     *     * @param session The <code>Session</code> to access the Repository.     * @param path The path of the class path entry, this is either the     *      path of a node containing a jar archive or is the path     *      of the root of a hierarchy to look up resources in.     */    protected ClassPathEntry(Session session, String path) {        this.path = path;        this.session = session;    }    /**     * Clones this instance of the <code>ClassPathEntry</code> setting the     * path and session to the same value as the base instance.     * <p>     * Note that this constructor does not duplicate the session from the base     * instance.     *     * @param base The <code>ClassPathEntry</code> from which to copy the path     *      and the session.     */    protected ClassPathEntry(ClassPathEntry base) {        this.path = base.path;        this.session = base.session;        this.baseURL = base.baseURL;    }    /**     * Returns an instance of the <code>ClassPathEntry</code> class. This     * instance will be a subclass correctly handling the type (directory or     * jar archive) of class path entry is to be created.     * <p>     * If the path given has a trailing slash, it is taken as a directory root     * else the path is first tested, whether it contains an archive. If not     * the path is treated as a directory.     *     * @param session The <code>Session</code> to access the Repository.     * @param path The path of the class path entry, this is either the     *      path of a node containing a jar archive or is the path     *      of the root of a hierharchy to look up resources in.     *     * @return An initialized <code>ClassPathEntry</code> instance for the     *      path or <code>null</code> if an error occurred creating the     *      instance.     */    static ClassPathEntry getInstance(Session session, String path) {        // check we can access the path, don't care about content now        try {            session.checkPermission(path, "read");        } catch (AccessControlException ace) {            log.warn(                "getInstance: Access denied reading from {}, ignoring entry",                path);            return null;        } catch (RepositoryException re) {            log.error("getInstance: Cannot check permission to " + path, re);        }        // only check for archive if no trailing slash in path        if (!path.endsWith("/")) {            InputStream is = null;            JarInputStream zip = null;            try {                Property prop = Util.getProperty(session.getItem(path));                if (prop != null) {                    is = prop.getStream();                    zip = new JarInputStream(is);                    if (zip.getNextJarEntry() != null /* && zip.read() != -1 */ ) {                        // use the expanding jar support if can expand                        if (ExpandingArchiveClassPathEntry.canExpandArchives(session)) {                            return new ExpandingArchiveClassPathEntry(prop, path);                        }                        // otherwise use the non-expanding                        return new ArchiveClassPathEntry(prop, path);                    }                    log.debug(                        "getInstance: {} might not be a jar archive, using as directory",                        path);                } else {                    log.debug(                        "getInstance: {} does not resolve to a property, using as directory",                        path);                }            } catch (ItemNotFoundException infe) {                // how to path ?                // thrown from                //   - Node.getPrimaryItem                //   -            } catch (PathNotFoundException pnfe) {                // how to path ?                // thrown from                //   - session.getItem                //   -            } catch (RepositoryException re) {                log.debug(                    "getInstance: {} cannot be read from, using as directory",                    path);            } catch (JarException ze) {                log.debug(                    "getInstance: {} does not contain an archive, using as directory",                    path);            } catch (IOException ioe) {                log.debug(                    "getInstance: {} problem reading from the archive, using as directory",                    path);            } finally {                if (zip != null) {                    try {                        zip.close();                    } catch (IOException ignored) {}                } else if (is != null) {                    try {                        is.close();                    } catch (IOException ignored) {}                }            }            // assume the path designates a directory            // append trailing slash now            path += "/";        }        // we assume a directory class path entry, but we might have to check        // whether the path refers to a node or not. On the other hande, this        // class path entry will not be usable anyway if not, user beware :-)        return new DirectoryClassPathEntry(session, path);    }    /**     * Returns the path on which this <code>ClassPathEntry</code> is based.     */    public String getPath() {        return path;    }    /**     * Returns this <code>ClassPathEntry</code> represented as an URL to be     * used in a list of URLs to further work on. If there is a problem creating     * the URL for this instance, <code>null</code> is returned instead.     */    public URL toURL() {        if (baseURL == null) {            try {                baseURL = URLFactory.createURL(session, path);            } catch (MalformedURLException mue) {                log.warn("DirectoryClassPathEntry: Creating baseURl for " +                    path, mue);            }        }        return baseURL;    }    /**     * Returns a <code>ClassPathEntry</code> with the same configuration as     * this <code>ClassPathEntry</code>.     * <p>     * The returned object may be but need not be a new instance. If the original     * implementation is an immutable class, the instance returned may well     * be the same as this.     */    abstract ClassPathEntry copy();    /**     * Searches for the named resource. The name is looked up as is, it is not     * further modified such as appended with ".class" or made relative. That     * is callers must make sure, that (1) this name is the full name of the     * resource to find and that (2) it is a relative name, that is it should     * not have a leading slash.     * <p>     * An example of a class to find would be :     * <code>org/apache/jackrabbit/test/Tester.class</code>     * which is converted from the generally used value     * <code>org.apache.jackrabbit.test.Tester</code>     * by the caller.     *     * @param name The name of the resource to find.     */    public abstract ClassLoaderResource getResource(String name);    /**     * @see Object#toString()     */    public String toString() {        StringBuffer buf = new StringBuffer(super.toString());        buf.append(": path: ");        buf.append(path);        buf.append(", user: ");        buf.append(session.getUserID());        return buf.toString();    }    //----------- internal helper ----------------------------------------------}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区老鸭窝| 99re热视频精品| 精品在线播放免费| 成人精品国产福利| 欧美一级黄色录像| 亚洲人xxxx| 国产91在线|亚洲| 日韩一区二区电影在线| 亚洲免费av高清| 国产999精品久久久久久| 欧美一区二区三区在线看| 国产精品动漫网站| 国产伦精品一区二区三区视频青涩 | 一区二区成人在线| 国产成人av一区二区三区在线观看| 欧美日韩aaa| 亚洲老司机在线| www.一区二区| 国产精品入口麻豆原神| 久久er99热精品一区二区| 在线播放中文字幕一区| 亚洲一区二区精品视频| 91久久奴性调教| 亚洲日本一区二区| 97久久人人超碰| 国产精品另类一区| 成人一级片网址| 久久精品一区二区三区不卡 | 亚洲男人的天堂av| 国产99精品国产| 国产日韩欧美综合在线| 国精产品一区一区三区mba视频| 日韩欧美在线不卡| 美腿丝袜亚洲三区| 日韩欧美国产一区二区三区| 日韩在线卡一卡二| 67194成人在线观看| 图片区小说区国产精品视频| 在线电影院国产精品| 日日夜夜免费精品视频| 这里只有精品电影| 久久精品国产999大香线蕉| 精品国产精品网麻豆系列| 久久er精品视频| 欧美激情一区二区三区蜜桃视频| 成人国产精品免费观看动漫| 亚洲美女精品一区| 欧美嫩在线观看| 久久精品国产99国产| 一区二区三区色| 欧美日韩国产欧美日美国产精品| 日本不卡在线视频| 久久亚洲一级片| caoporen国产精品视频| 亚洲香肠在线观看| 欧美一区二区三区小说| 国产精品亚洲专一区二区三区| 国产精品美女视频| 欧美日韩国产影片| 国产麻豆视频一区| 一区av在线播放| 日韩精品影音先锋| 99re成人精品视频| 日本在线观看不卡视频| 国产欧美综合在线| 欧美日韩精品一区二区天天拍小说| 男女男精品网站| 中文字幕亚洲一区二区va在线| 欧美日韩在线综合| 国产一区二区在线观看视频| 亚洲欧洲综合另类在线| 欧美电影精品一区二区| 91在线精品秘密一区二区| 日韩精品每日更新| 亚洲欧洲精品一区二区三区不卡| 在线播放/欧美激情| 大桥未久av一区二区三区中文| 午夜精品福利一区二区三区蜜桃| 久久嫩草精品久久久精品| 欧美亚洲一区二区在线| 国产传媒日韩欧美成人| 亚洲国产一区二区三区| 国产女人aaa级久久久级| 精品视频免费在线| 成人中文字幕电影| 蜜桃在线一区二区三区| 一区二区三区美女| 国产精品免费av| 精品国产乱码久久久久久久| 欧美日韩国产另类不卡| 97精品超碰一区二区三区| 久久99国产精品久久99| 亚洲va国产天堂va久久en| 国产精品美女久久福利网站| 精品人伦一区二区色婷婷| 欧美午夜精品免费| 一本在线高清不卡dvd| 国产成人精品免费在线| 国产在线精品一区二区不卡了| 水野朝阳av一区二区三区| 亚洲精品伦理在线| 亚洲人一二三区| 国产精品久久二区二区| 国产色产综合产在线视频| 精品国内二区三区| 日韩一级免费观看| 欧美一区二区三区不卡| 3atv一区二区三区| 在线91免费看| 91麻豆精品国产无毒不卡在线观看| 91久久久免费一区二区| 在线观看国产一区二区| 在线视频国内自拍亚洲视频| 91一区二区三区在线播放| www.激情成人| 91欧美一区二区| 色综合中文字幕国产 | wwwwxxxxx欧美| 日韩欧美国产一区二区三区| 日韩三级免费观看| 日韩写真欧美这视频| 日韩美女视频在线| 久久品道一品道久久精品| 久久蜜桃一区二区| 国产欧美综合色| 亚洲私人影院在线观看| 亚洲一区在线观看视频| 亚洲成精国产精品女| 免费精品视频在线| 激情久久五月天| 成人午夜视频在线| 在线观看免费亚洲| 91精品国产综合久久久久久漫画 | 日产精品久久久久久久性色| 麻豆国产91在线播放| 国内国产精品久久| 波多野结衣精品在线| 色哟哟精品一区| 91精品免费在线观看| 久久日韩粉嫩一区二区三区 | 色婷婷激情久久| 欧美日韩不卡视频| 精品日韩一区二区三区 | 亚洲国产精品一区二区久久恐怖片| 亚洲成人午夜电影| 国产一区二区在线观看视频| 本田岬高潮一区二区三区| 在线免费观看不卡av| 欧美大度的电影原声| 欧美国产欧美综合| 五月婷婷欧美视频| 国产成人综合在线| 欧美性受xxxx黑人xyx性爽| 欧美大片免费久久精品三p| 中文字幕亚洲视频| 青青草97国产精品免费观看无弹窗版 | 亚洲午夜成aⅴ人片| 看电影不卡的网站| av动漫一区二区| 日韩欧美久久久| 亚洲精品乱码久久久久久黑人| 经典三级视频一区| 欧洲亚洲国产日韩| 久久久亚洲综合| 亚洲国产成人91porn| 成人黄页在线观看| 日韩一区二区三区电影在线观看| 国产精品久久久久影院| 精品一区二区三区在线观看国产| 99re热这里只有精品免费视频| 精品国精品国产尤物美女| 亚洲影视在线播放| 欧美美女喷水视频| 国产精品成人网| 蜜桃视频在线观看一区二区| 91国产精品成人| 中文字幕国产精品一区二区| 老司机精品视频导航| 欧美三级日韩三级国产三级| 国产精品丝袜久久久久久app| 精品一区二区三区免费观看| 91麻豆精品国产91久久久使用方法 | 五月激情综合婷婷| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲图片激情小说| 国产成人日日夜夜| 精品成人免费观看| 久久精品国内一区二区三区| 欧美日韩一区二区欧美激情| 亚洲精品欧美综合四区| 99久久99久久久精品齐齐| 中文字幕不卡在线| 国产成人aaaa| 国产女主播一区| 成人免费视频免费观看| 国产精品女上位| www.一区二区| 亚洲精品乱码久久久久| 93久久精品日日躁夜夜躁欧美| 亚洲欧美在线视频|