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

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

?? jcrjarurlhandler.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.net;import java.net.URI;import java.net.URISyntaxException;import java.net.URL;import java.net.URLConnection;import javax.jcr.Session;/** * The <code>JCRJarURLHandler</code> is the <code>URLStreamHandler</code> for * Java Archive URLs for archives from a JCR Repository URLs (JCRJar URL). The * scheme for such ULRs will be <code>jar</code> while the file part of the URL * has the scheme <code>jcr</code>. * <p> * JCRJar URLs have not been standardized yet and may only be created in the * context of an existing <code>Session</code>. Therefore this handler is not * globally available and JCR Repository URLs may only be created through the * factory methods in the {@link org.apache.jackrabbit.net.URLFactory} class. * <p> * This class is not intended to be subclassed or instantiated by clients. * * @author Felix Meschberger * * @see org.apache.jackrabbit.net.JCRJarURLConnection * @see org.apache.jackrabbit.net.URLFactory * @see org.apache.jackrabbit.net.URLFactory#createJarURL(Session, String, String) */class JCRJarURLHandler extends JCRURLHandler {    /**     * Creates an instance of this handler class.     *     * @param session The <code>Session</code> supporting this handler. This     *      must not be <code>null</code>.     *     * @throws NullPointerException if <code>session</code> is <code>null</code>.     */    JCRJarURLHandler(Session session) {        super(session);    }    //---------- URLStreamHandler abstracts ------------------------------------    /**     * Gets a connection object to connect to an JCRJar URL.     *     * @param url The JCRJar URL to connect to.     *     * @return An instance of the {@link JCRJarURLConnection} class.     *     * @see JCRJarURLConnection     */    protected URLConnection openConnection(URL url) {        return new JCRJarURLConnection(url, this);    }    /**     * Parses the string representation of a <code>URL</code> into a     * <code>URL</code> object.     * <p>     * If there is any inherited context, then it has already been copied into     * the <code>URL</code> argument.     * <p>     * The <code>parseURL</code> method of <code>URLStreamHandler</code>     * parses the string representation as if it were an <code>http</code>     * specification. Most URL protocol families have a similar parsing. A     * stream protocol handler for a protocol that has a different syntax must     * override this routine.     *     * @param url the <code>URL</code> to receive the result of parsing the     *            spec.     * @param spec the <code>String</code> representing the URL that must be     *            parsed.     * @param start the character index at which to begin parsing. This is just     *            past the '<code>:</code>' (if there is one) that specifies     *            the determination of the protocol name.     * @param limit the character position to stop parsing at. This is the end     *            of the string or the position of the "<code>#</code>"     *            character, if present. All information after the sharp sign     *            indicates an anchor.     */    protected void parseURL(URL url, String spec, int start, int limit) {        // protected void parseURL(URL url, String s, int i, int j)        String file = null;        String ref = null;        // split the reference and file part        int hash = spec.indexOf('#', limit);        boolean emptyFile = hash == start;        if (hash > -1) {            ref = spec.substring(hash + 1, spec.length());            if (emptyFile) {                file = url.getFile();            }        }        boolean isSpecAbsolute = spec.substring(0, 4).equalsIgnoreCase("jar:");        spec = spec.substring(start, limit);        if (isSpecAbsolute) {            // get the file part from the absolute spec            file = parseAbsoluteSpec(spec);        } else if (!emptyFile) {            // build the file part from the url and relative spec            file = parseContextSpec(url, spec);            // split archive and entry names            int bangSlash = indexOfBangSlash(file);            String archive = file.substring(0, bangSlash);            String entry = file.substring(bangSlash);            // collapse /../, /./ and //            entry = canonizeString(entry);            file = archive + entry;        }        setURL(url, "jar", "", -1, null, null, file, null, ref);    }    //---------- internal -----------------------------------------------------    /**     * Finds the position of the bang slash (!/) in the file part of the URL.     */    static int indexOfBangSlash(String file) {        for (int i = file.length(); (i = file.lastIndexOf('!', i)) != -1; i--) {            if (i != file.length() - 1 && file.charAt(i + 1) == '/') {                return i + 1;            }        }        return -1;    }    /**     * Parses the URL spec and checks whether it contains a bang slash and     * whether it would get a valid URL. Returns the same value if everything is     * fine else a <code>NullPointerException</code> is thrown.     *     * @param spec The URL specification to check.     * @return The <code>spec</code> if everything is ok.     * @throws NullPointerException if either no bang slash is contained in the     *             spec or if the spec without the bang slash part would not be     *             a valid URL.     */    private String parseAbsoluteSpec(String spec) {        // find and check bang slash        int bangSlash = indexOfBangSlash(spec);        if (bangSlash == -1) {            throw new NullPointerException("no !/ in spec");        }        try {            String testSpec = spec.substring(0, bangSlash - 1);            URI uri = new URI(testSpec);            // verify the scheme is the JCR Repository Scheme            if (!URLFactory.REPOSITORY_SCHEME.equals(uri.getScheme())) {                throw new URISyntaxException(testSpec,                    "Unsupported Scheme " + uri.getScheme(), 0);            }        } catch (URISyntaxException use) {            throw new NullPointerException("invalid url: " + spec + " (" + use                + ")");        }        return spec;    }    /**     * Merges the specification and the file part of the URL respecting the bang     * slashes. If the specification starts with a slash, it is regarded as a     * complete path of a archive entry and replaces an existing archive entry     * specification in the url. Examples :<br>     * <table>     * <tr>     * <th align="left">file     * <th align="left">spec     * <th align="left">result     * <tr>     * <td>/some/file/path.jar!/     * <td>/some/entry/path     * <td>/some/file/path.jar!/some/entry/path     * <tr>     * <td>/some/file/path.jar!/some/default     * <td>/some/entry/path     * <td>/some/file/path.jar!/some/entry/path </table>     * <p>     * If the specification is not absolutes it replaces the last file name part     * if the file name does not end with a slash. Examples :<br>     * <table>     * <tr>     * <th align="left">file     * <th align="left">spec     * <th align="left">result     * <tr>     * <td>/some/file/path.jar!/     * <td>/some/entry/path     * <td>/some/file/path.jar!/some/entry/path     * <tr>     * <td>/some/file/path.jar!/some/default     * <td>/some/entry/path     * <td>/some/file/path.jar!/some/entry/path </table>     *     * @param url The <code>URL</code> whose file part is used     * @param spec The specification to merge with the file part     * @throws NullPointerException If the specification starts with a slash and     *             the URL does not contain a slash bang or if the specification     *             does not start with a slash and the file part of the URL does     *             is not an absolute file path.     */    private String parseContextSpec(URL url, String spec) {        // spec is relative to this file        String file = url.getFile();        // if the spec is absolute path, it is an absolute entry spec        if (spec.startsWith("/")) {            // assert the bang slash in the original URL            int bangSlash = indexOfBangSlash(file);            if (bangSlash == -1) {                throw new NullPointerException("malformed context url:" + url                    + ": no !/");            }            // remove bang slash part from the original file            file = file.substring(0, bangSlash);        }        // if the file is not a directory and spec is a relative file path        if (!file.endsWith("/") && !spec.startsWith("/")) {            // find the start of the file name in the url file path            int lastSlash = file.lastIndexOf('/');            if (lastSlash == -1) {                throw new NullPointerException("malformed context url:" + url);            }            // cut off the file name from the URL file path            file = file.substring(0, lastSlash + 1);        }        // concat file part and the spec now        return file + spec;    }    public String canonizeString(String s) {        int i = 0;        int k = s.length();        while ((i = s.indexOf("/../")) >= 0)            if ((k = s.lastIndexOf('/', i - 1)) >= 0)                s = s.substring(0, k) + s.substring(i + 3);            else                s = s.substring(i + 3);        while ((i = s.indexOf("/./")) >= 0)            s = s.substring(0, i) + s.substring(i + 2);        while (s.endsWith("/..")) {            int j = s.indexOf("/..");            int l;            if ((l = s.lastIndexOf('/', j - 1)) >= 0)                s = s.substring(0, l + 1);            else                s = s.substring(0, j);        }        if (s.endsWith("/.")) s = s.substring(0, s.length() - 1);        return s;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩和欧美的一区二区| 91九色最新地址| 91一区二区在线| 91精品黄色片免费大全| 国产精品久久久久一区| 蜜桃视频一区二区三区| 在线这里只有精品| 国产精品久久久久aaaa| 蜜桃久久久久久| 欧美色网站导航| 国产精品久久久久7777按摩| 国精产品一区一区三区mba视频 | 欧美性感一区二区三区| 久久综合久久综合九色| 日韩精品成人一区二区在线| 欧美艳星brazzers| 亚洲婷婷在线视频| 岛国一区二区在线观看| 久久久久久97三级| 久久99精品久久久久婷婷| 91精品欧美一区二区三区综合在| 一区二区三区高清| 一本色道亚洲精品aⅴ| 国产精品久久久久久久久免费相片 | 成人一区二区三区在线观看| 日韩美女一区二区三区四区| 日韩精品国产欧美| 91麻豆精品91久久久久久清纯 | 中文字幕成人在线观看| 久久精品国产久精国产爱| 91精品国产一区二区三区香蕉 | 91麻豆精品国产91久久久久久 | 91精品国产手机| 午夜久久久影院| 91精品国产综合久久香蕉的特点 | 国产精品福利影院| 成人av在线播放网站| 欧美日韩一区 二区 三区 久久精品| 亚洲私人黄色宅男| 99久久精品一区| 一区二区三区产品免费精品久久75| 91麻豆精东视频| 亚洲高清不卡在线| 中文字幕一区二区在线观看| 国产精品18久久久| 国产精品免费视频一区| 色中色一区二区| 亚洲成人av一区二区三区| 欧美一区二区三区电影| 国产中文字幕精品| 综合分类小说区另类春色亚洲小说欧美| 99久久精品国产精品久久| 亚洲一区二区成人在线观看| 欧美一区二区三区公司| 国产精品69毛片高清亚洲| 亚洲欧洲综合另类| 91精品欧美综合在线观看最新| 国产一区二区三区在线观看免费视频| 日本一区二区三区在线观看| 色爱区综合激月婷婷| 日本三级韩国三级欧美三级| 狠狠久久亚洲欧美| 欧美电影免费观看高清完整版在 | 亚洲成av人片一区二区梦乃| 91精品麻豆日日躁夜夜躁| 国产一区在线精品| 亚洲黄色av一区| 日韩欧美亚洲国产另类| 成人高清免费观看| 亚洲第一主播视频| 国产女人aaa级久久久级| 欧美性大战久久久久久久蜜臀| 九一九一国产精品| 一区二区三区波多野结衣在线观看| 欧美一区二视频| 91久色porny | 亚洲狼人国产精品| 欧美草草影院在线视频| 色美美综合视频| 国产综合色视频| 午夜精品一区二区三区电影天堂| 久久人人爽爽爽人久久久| 欧美色图片你懂的| 北岛玲一区二区三区四区| 九九国产精品视频| 亚洲1区2区3区视频| |精品福利一区二区三区| 精品国产免费视频| 在线不卡一区二区| 欧洲精品在线观看| caoporn国产精品| 国产乱对白刺激视频不卡| 日韩国产一二三区| 亚洲视频综合在线| 欧美国产日韩精品免费观看| 日韩你懂的电影在线观看| 欧美日韩色一区| 91精品91久久久中77777| 处破女av一区二区| 国产精品69毛片高清亚洲| 精品一区二区久久久| 日本不卡一区二区| 石原莉奈一区二区三区在线观看| 亚洲女人小视频在线观看| 国产精品久久久久永久免费观看 | 国产电影一区二区三区| 免费成人av在线| 喷白浆一区二区| 日韩制服丝袜先锋影音| 亚洲一区在线视频| 亚洲国产精品自拍| 亚洲一区二区视频在线| 亚洲国产一二三| 午夜精品福利在线| 天堂av在线一区| 免费不卡在线视频| 狠狠色丁香久久婷婷综合丁香| 久久综合综合久久综合| 久久精品国产色蜜蜜麻豆| 蜜桃视频一区二区三区在线观看| 免费在线看一区| 国产自产高清不卡| 国产精品一卡二卡在线观看| 国产iv一区二区三区| 成人免费视频视频在线观看免费 | 欧美日韩国产中文| 欧美猛男男办公室激情| 日韩一级精品视频在线观看| 精品少妇一区二区三区在线播放| 精品久久久久久综合日本欧美| 精品免费视频.| 国产蜜臀97一区二区三区| 国产精品视频第一区| 伊人性伊人情综合网| 亚洲 欧美综合在线网络| 老司机一区二区| 丁香另类激情小说| 欧美色图激情小说| 精品国产髙清在线看国产毛片| 久久久av毛片精品| 亚洲黄色在线视频| 蜜臀国产一区二区三区在线播放| 韩国女主播一区二区三区| 成人av午夜电影| 欧美肥妇bbw| 国产欧美日韩卡一| 亚洲国产精品一区二区www在线| 久久er精品视频| 97精品国产97久久久久久久久久久久| 欧美男人的天堂一二区| 2021国产精品久久精品| 亚洲视频免费在线| 久久国产夜色精品鲁鲁99| 色综合久久天天综合网| 日韩免费高清av| 亚洲一线二线三线久久久| 国产麻豆精品95视频| 欧美区一区二区三区| 欧美激情一区二区三区| 日韩在线一二三区| 99视频精品免费视频| 欧美videofree性高清杂交| 亚洲人成网站在线| 国产精品一区免费视频| 欧美精品久久99久久在免费线| 国产精品私人影院| 精品一区二区三区在线播放视频| 色94色欧美sute亚洲线路二| 久久蜜桃一区二区| 日本美女一区二区三区视频| 91在线国内视频| 国产欧美一区二区三区在线看蜜臀 | 日韩电影一区二区三区| 国产成人超碰人人澡人人澡| 5858s免费视频成人| 亚洲欧美偷拍另类a∨色屁股| 国产精品18久久久久| 欧美一区二区性放荡片| 亚洲国产日韩av| 色诱视频网站一区| 国产精品私人自拍| 成人免费看黄yyy456| 精品国产污污免费网站入口| 日韩精品国产精品| 欧美日韩免费在线视频| 亚洲蜜臀av乱码久久精品蜜桃| 成人激情文学综合网| 久久精品免费在线观看| 久久精品国产免费| 精品国产一区久久| 精品午夜一区二区三区在线观看| 5858s免费视频成人| 亚洲国产精品久久艾草纯爱| 色噜噜狠狠色综合欧洲selulu | 久久久亚洲精品石原莉奈| 日本亚洲三级在线| 欧美一卡在线观看| 免费人成在线不卡| 欧美电影免费观看高清完整版在| 麻豆精品在线看|