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

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

?? jcrjarurlconnection.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.io.IOException;import java.io.InputStream;import java.net.URL;import java.util.jar.JarEntry;import java.util.jar.JarInputStream;import javax.jcr.Property;import javax.jcr.RepositoryException;import org.slf4j.Logger;import org.slf4j.LoggerFactory;/** * The <code>JCRJarURLConnection</code> extends the * {@link org.apache.jackrabbit.net.JCRURLConnection} class to support accessing * archive files stored in a JCR Repository. * <p> * Just like the base class, this class requires the URL to resolve, either * directly or through primary item chain, to a repository <code>Property</code>. * <p> * Access to this connections property and archive entry content is perpared * with the {@link #connect()}, which after calling the base class implementation * to find the property tries to find the archive entry and set the connection's * fields according to the entry. This implementation's {@link #connect()} * method fails if the named entry does not exist in the archive. * <p> * The {@link #getInputStream()} method either returns an stream on the archive * entry or on the archive depending on whether an entry path is specified * in the URL or not. Like the base class implementation, this implementation * returns a new <code>InputStream</code> on each invocation. * <p> * If an entry path is defined on the URL, the header fields are set from the * archive entry: * <table border="0" cellspacing="0" cellpadding="3"> *  <tr><td><code>Content-Type</code><td>Guessed from the entry name or *      <code>application/octet-stream</code> if the type cannot be guessed *      from the name</tr> *  <tr><td><code>Content-Encoding</code><td><code>null</code></tr> *  <tr><td><code>Content-Length</code><td>The size of the entry</tr> *  <tr><td><code>Last-Modified</code><td>The last modification time of the *      entry</tr> * </table> * <p> * If no entry path is defined on the URL, the header fields are set from the * property by the base class implementation with the exception of the * content type, which is set to <code>application/java-archive</code> by * the {@link #connect()} method. * <p> * <em>Note that this implementation does only support archives stored in the * JCR Repository, no other contained storage such as </em>file<em> or * </em>http<em> is supported.</em> * <p> * This class is not intended to be subclassed or instantiated by clients. * * @author Felix Meschberger */public class JCRJarURLConnection extends JCRURLConnection {    /** default log category */    private static final Logger log =        LoggerFactory.getLogger(JCRJarURLConnection.class);    /**     * The name of the MIME content type for this connection's content if     * no entry path is defined on the URL (value is "application/java-archive").     */    protected static final String APPLICATION_JAR = "application/java-archive";    /**     * Creates an instance of this class for the given <code>url</code>     * supported by the <code>handler</code>.     *     * @param url The URL to base the connection on.     * @param handler The URL handler supporting the given URL.     */    JCRJarURLConnection(URL url, JCRJarURLHandler handler) {        super(url, handler);    }    /**     * Returns the path to the entry contained in the archive or     * <code>null</code> if the URL contains no entry specification in the     * path.     */    String getEntryPath() {        return getFileParts().getEntryPath();    }    /**     * Connects to the URL setting the header fields and preparing for the     * {@link #getProperty()} and {@link #getInputStream()} methods.     * <p>     * After calling the base class implemenation to get the basic connection,     * the entry is looked for in the archive to set the content type, content     * length and last modification time header fields according to the named     * entry. If no entry is defined on the URL, only the content type header     * field is set to <code>application/java-archive</code>.     * <p>     * When this method successfully returns, this connection is considered     * connected. In case of an exception thrown, the connection is not     * connected.     *     * @throws IOException if an error occurrs retrieving the data property or     *      any of the header field value properties or if any other errors     *      occurrs. Any cuasing exception is set as the cause of this     *      exception.     */    public synchronized void connect() throws IOException {        if (!connected) {            // have the base class connect to get the jar property            super.connect();            // we assume the connection is now (temporarily) connected,            // thus calling the getters will not result in a recursive loop            Property property = getProperty();            String contentType = getContentType();            String contentEncoding = getContentEncoding();            int contentLength = getContentLength();            long lastModified = getLastModified();            // mark as not connected to not get false positives if the            // following code fails            connected = false;            // Get hold of the data            try {                JarInputStream jins = null;                try {                    // try to get the jar input stream, fail if no jar                    jins = new JarInputStream(property.getStream());                    String entryPath = getEntryPath();                    if (entryPath != null) {                        JarEntry entry = findEntry(jins, entryPath);                        if (entry != null) {                            contentType = guessContentTypeFromName(entryPath);                            if (contentType == null) {                                contentType = APPLICATION_OCTET;                            }                            contentLength = (int) entry.getSize();                            lastModified = entry.getTime();                        } else {                            throw failure("connect", entryPath +                                " not contained in jar archive", null);                        }                    } else {                        // replaces the base class defined content type                        contentType = APPLICATION_JAR;                    }                } finally {                    if (jins != null) {                        try {                            jins.close();                        } catch (IOException ignore) {                        }                    }                }                log.debug("connect: Using atom '" + property.getPath()                    + "' with content type '" + contentType + "' for "                    + String.valueOf(contentLength) + " bytes");                // set the fields                setContentType(contentType);                setContentEncoding(contentEncoding);                setContentLength(contentLength);                setLastModified(lastModified);                // mark connection open                connected = true;            } catch (RepositoryException re) {                throw failure("connect", re.toString(), re);            }        }    }    /**     * Returns an input stream that reads from this open connection. If not     * entry path is specified in the URL, this method returns the input stream     * providing access to the archive as a whole. Otherwise the input stream     * returned is a <code>JarInputStream</code> positioned at the start of     * the named entry.     * <p>     * <b>NOTES:</b>     * <ul>     * <li>Each call to this method returns a new <code>InputStream</code>.     * <li>Do not forget to close the return stream when not used anymore for     *      the system to be able to free resources.     * </ul>     * <p>     * Calling this method implicitly calls {@link #connect()} to ensure the     * connection is open.     *     * @return The <code>InputStream</code> on the archive or the entry if     *      specified.     *     * @throws IOException if an error occurrs opening the connection through     *      {@link #connect()} or creating the <code>InputStream</code> on the     *      repository <code>Property</code>.     */    public InputStream getInputStream() throws IOException {        // get the input stream on the archive itself - also enforces connect()        InputStream ins = super.getInputStream();        // access the entry in the archive if defined        String entryPath = getEntryPath();        if (entryPath != null) {            // open the jar input stream            JarInputStream jins = new JarInputStream(ins);            // position at the correct entry            findEntry(jins, entryPath);            // return the input stream            return jins;        }        // otherwise just return the stream on the archive        return ins;    }    //----------- internal helper to find the entry ------------------------    /**     * Returns the <code>JarEntry</code> for the path from the     * <code>JarInputStream</code> or <code>null</code> if the path cannot     * be found in the archive.     *     * @param zins The <code>JarInputStream</code> to search in.     * @param path The path of the <code>JarEntry</code> to return.     *     * @return The <code>JarEntry</code> for the path or <code>null</code>     *      if no such entry can be found.     *     * @throws IOException if a problem occurrs reading from the stream.     */    static JarEntry findEntry(JarInputStream zins, String path)        throws IOException {        JarEntry entry = zins.getNextJarEntry();        while (entry != null) {            if (path.equals(entry.getName())) {                return entry;            }            entry = zins.getNextJarEntry();        }        // invariant : nothing found in the zip matching the path        return null;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成a人亚洲精品| 日韩精品一二三区| 成人黄色在线看| 国产精品成人免费| 成人av一区二区三区| 国产精品久久久久三级| 色婷婷综合久久久中文字幕| 亚洲激情综合网| 欧美日韩你懂得| 91浏览器在线视频| 亚洲精品免费在线| 91.xcao| 毛片不卡一区二区| 国产香蕉久久精品综合网| 成人免费三级在线| 亚洲狠狠爱一区二区三区| 制服视频三区第一页精品| 国产一区二区三区在线看麻豆| 国产欧美久久久精品影院| 91亚洲男人天堂| 另类小说综合欧美亚洲| 中文在线一区二区| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲欧美日韩国产另类专区| 色综合中文字幕| 免费在线看成人av| 欧美精品一区二| 色婷婷精品久久二区二区蜜臀av | 午夜精品免费在线观看| 精品欧美乱码久久久久久1区2区| 国产成人免费高清| 性久久久久久久| 亚洲国产精品v| 欧美男男青年gay1069videost| 激情图区综合网| 一个色综合av| 欧美极品少妇xxxxⅹ高跟鞋| 欧美色区777第一页| 国产91精品一区二区麻豆网站| 日韩精品三区四区| 亚洲欧洲在线观看av| 精品国产免费一区二区三区香蕉| 91麻豆国产精品久久| 国产一区二区美女| 日韩精品一二三| 亚洲码国产岛国毛片在线| 久久免费视频一区| 777a∨成人精品桃花网| 色综合夜色一区| 成人激情视频网站| 国产高清久久久| 久久99精品久久久久久动态图| 亚洲一二三区视频在线观看| 国产精品视频九色porn| 2023国产精品| 欧美不卡激情三级在线观看| 欧美人伦禁忌dvd放荡欲情| av资源站一区| 高清国产一区二区三区| 国产精品一区二区男女羞羞无遮挡| 午夜久久电影网| 亚洲国产乱码最新视频| 亚洲欧美日韩久久精品| 国产精品久久久久久久久免费桃花| www国产精品av| 26uuu另类欧美亚洲曰本| 欧美一级二级三级蜜桃| 3d动漫精品啪啪一区二区竹菊| 欧美在线高清视频| 欧美中文字幕一区二区三区 | 精品一区二区三区影院在线午夜| 天天综合网 天天综合色| 亚洲激情图片qvod| 亚洲乱码国产乱码精品精98午夜 | 一区二区三区欧美| 亚洲少妇最新在线视频| 中文字幕综合网| 亚洲激情在线播放| 亚洲小说欧美激情另类| 婷婷综合另类小说色区| 丝袜美腿成人在线| 麻豆精品新av中文字幕| 久久精品国产澳门| 国产综合色精品一区二区三区| 激情都市一区二区| 国产mv日韩mv欧美| 不卡的看片网站| 色婷婷综合久久久中文一区二区| 色悠久久久久综合欧美99| 欧美在线一二三| 欧美理论片在线| 日韩女优av电影| 中文av一区特黄| 亚洲精品国产a| 免费看欧美女人艹b| 久久成人免费电影| 成人高清免费在线播放| 91国偷自产一区二区开放时间 | 日本一区二区三区高清不卡| 国产精品三级电影| 亚洲国产毛片aaaaa无费看| 久久精品国产**网站演员| 国产精品18久久久久久vr| 99久久久久久99| 欧美高清www午色夜在线视频| 欧美va亚洲va香蕉在线| 中文字幕一区二区三区四区不卡| 亚洲午夜国产一区99re久久| 毛片不卡一区二区| 99久久99久久精品免费观看 | 人人精品人人爱| 国产成人午夜高潮毛片| 一本高清dvd不卡在线观看| 91精品国产一区二区| 国产日韩高清在线| 亚洲一区国产视频| 国产 日韩 欧美大片| 欧美三级乱人伦电影| 久久久久久久久久久久久久久99| 亚洲另类中文字| 国产精品一区二区三区四区| 欧美中文字幕一区| 国产精品丝袜一区| 人妖欧美一区二区| 日本韩国一区二区三区视频| 精品久久久久99| 亚洲成人激情社区| 成人白浆超碰人人人人| 日韩三区在线观看| 亚洲影院在线观看| 成人aa视频在线观看| 精品少妇一区二区三区在线播放| 亚洲日本在线视频观看| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲成年人网站在线观看| 国产乱人伦偷精品视频不卡 | 国产伦精品一区二区三区免费迷 | 在线观看精品一区| 国产精品天干天干在线综合| 美腿丝袜在线亚洲一区| 在线精品观看国产| 国产精品视频第一区| 国产一区二区三区最好精华液| 欧美精品tushy高清| 亚洲自拍偷拍网站| 91网站最新网址| 国产精品天干天干在线综合| 久久国产福利国产秒拍| 欧美日韩美少妇| 亚洲一区免费观看| 91久久精品网| 亚洲视频小说图片| 99久久99久久精品免费观看| 国产午夜精品在线观看| 精品一区二区国语对白| 欧美岛国在线观看| 免费看日韩a级影片| 欧美一区二区三区人| 日韩电影一区二区三区四区| 欧美午夜宅男影院| 亚洲小少妇裸体bbw| 欧日韩精品视频| 亚洲一区在线播放| 欧美日韩精品系列| 婷婷成人激情在线网| 欧美久久久久久久久中文字幕| 亚洲国产精品嫩草影院| 欧美日韩一级视频| 丝袜亚洲另类欧美| 欧美一级xxx| 精品一区二区三区视频| 久久综合色天天久久综合图片| 精品在线播放免费| 久久久欧美精品sm网站| 国产高清在线精品| 国产精品美日韩| 色偷偷一区二区三区| 一区二区三区中文字幕精品精品| 91女神在线视频| 亚洲一区二区偷拍精品| 91精品国产综合久久婷婷香蕉 | 精品成人佐山爱一区二区| 久久电影网站中文字幕| 久久亚洲综合av| 成人av免费网站| 一二三区精品视频| 91麻豆精品国产91久久久| 久久99精品国产麻豆婷婷| 国产无一区二区| 色激情天天射综合网| 日韩精品一二三四| 国产日产欧美一区| 一本色道a无线码一区v| 日韩和的一区二区| 久久精品在线免费观看| 91美女在线观看| 麻豆中文一区二区| 成人免费小视频| 日韩欧美一二三区| 白白色 亚洲乱淫|