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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? filterurlconverter.java

?? Jvie論壇的程序
?? JAVA
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */
 
package com.Yasna.forum.filter;

import com.Yasna.forum.*;
import java.util.*;

/**
 * A ForumMessageFilter that converts URL's to working HTML web links.
 */
public class FilterURLConverter extends ForumMessageFilter {

    /**
     * Property values of the filter.
     */
    private Properties props;

    /**
     * Property descriptions of the filter.
     */
    private Properties propDescriptions;

   /**
    * Creates a new filter not associated with a message. This is
    * generally only useful for defining a template filter that other
    * fitlers will be cloned from.
    */
    public FilterURLConverter() {
        super();
        props = new Properties();
        propDescriptions = new Properties();
        initializeProperties();
    }

    /**
     * Creates a new filter wrapped around the specified message. This
     * constructor is normally called when cloning a filter template.
     *
     * @param message the ForumMessage to wrap the new filter around.
     * @param properties the property values for the filter.
     * @param propertyDescriptions the property descriptions for the filter.
     */
    public FilterURLConverter(ForumMessage message, Properties properties,
            Properties propertyDescriptions)
    {
        super(message);
        this.props = new Properties(properties);
        this.propDescriptions = new Properties(propertyDescriptions);
    }

    /**
     * Clones a new filter that will have the same properties and that
     * will wrap around the specified message.
     *
     * @param message the ForumMessage to wrap the new filter around.
     */
    public ForumMessageFilter clone(ForumMessage message){
        return new FilterURLConverter(message, props, propDescriptions);
    }

    /**
     * Returns the name of the filter.
     */
    public String getName() {
        return "URL Converter";
    }

    /**
     * Returns a description of the filter.
     */
    public String getDescription() {
        return "Converts URL's to working web links.";
    }

    /**
     * Returns the author of the filter.
     */
    public String getAuthor() {
        return "CoolServlets.com";
    }

    /**
     * Returns the major version number of the filter.
     */
    public int getMajorVersion() {
        return 1;
    }

    /**
     * Returns the minor version number of the filter.
     */
    public int getMinorVersion() {
        return 0;
    }

    /**
     * Returns the value of a property of the filter.
     *
     * @param name the name of the property.
     * @returns the value of the property.
     */
    public String getFilterProperty(String name) {
        return props.getProperty(name);
    }

    /**
     * Returns the description of a property of the filter.
     *
     * @param name the name of the property.
     * @return the description of the property.
     */
    public String getFilterPropertyDescription(String name) {
        return propDescriptions.getProperty(name);
    }

    /**
     * Returns an Enumeration of all the property names.
     */
    public Enumeration filterPropertyNames() {
        return props.propertyNames();
    }

    /**
     * Sets a property of the filter. Each filter has a set number of
     * properties that are determined by the filter author. 
     *
     * @param name the name of the property to set.
     * @param value the new value for the property.
     *
     * @throws IllegalArgumentException if the property trying to be set doesn't
     *    exist.
     */
    public void setFilterProperty(String name, String value)
            throws IllegalArgumentException
    {
        if (props.getProperty(name) == null) {
            throw new IllegalArgumentException();
        }
        props.put(name, value);
    }

    /**
     * <b>Overloaded</b> to return the body of message with URLs changed
     * to working links.
     */
    public String getBody() {
        return convertURL(message.getBody());
    }

    /**
     * Creates properties and sets their descriptions.
     */
    private void initializeProperties() {
    }

    /**
     * This method takes a string which may contain URLs
     * and replaces them with working links.  It does this
     * by adding the html tags <a href> and </a>.
     *
     * @param input the text to be converted.
     * @returns the input string with the URLs replaced with links.
     */
    private String convertURL( String input ) {
        //Check if the string is null or zero length -- if so, return
        //what was sent in.
        if( input == null || input.length() == 0 ) {
            return input;
        }
        else {
            StringBuffer buf = new StringBuffer();
            
            int i = 0, j = 0, oldend = 0;
            int len = input.length();
            char cur;

            while ( ( i=input.indexOf( "http://", oldend) ) >= 0 ) {
                j=i+7;
                cur = input.charAt(j);
                while (j < len) {
                    //Is a space?
                    if (cur == ' ') break;
                    //Is html?
                    if (cur == '<') break;
                    //Is a Win32 newline?
                    if (cur == '\n') break;
                    //Is Unix newline?
                    if (cur == '\r' && j<len-1 && input.charAt(j+1) == '\n')
                        break;

                    j++;
                    if (j<len) {
                        cur = input.charAt(j);
                    }
                }
                buf.append(input.substring(oldend,i));
                buf.append("<a href =\"");
                buf.append(input.substring(i,j));
                buf.append("\">");
                buf.append(input.substring(i,j));
                buf.append("</a>");
                oldend = j;
            }
            buf.append(input.substring(j,len));
            return buf.toString();
        }
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁一区二区三区| 久久九九久久九九| 欧美视频你懂的| 欧美综合亚洲图片综合区| 在线精品观看国产| 91久久免费观看| 欧美日韩久久久久久| 欧美三级资源在线| 在线不卡的av| 精品国产污污免费网站入口 | av网站免费线看精品| 北岛玲一区二区三区四区| 福利一区二区在线| 成人av电影免费观看| 色偷偷成人一区二区三区91| 欧美一级二级三级乱码| 精品国产a毛片| 久久久午夜精品| 中文字幕在线不卡一区二区三区| 亚洲免费av高清| 午夜精品一区在线观看| 精品写真视频在线观看| 成人免费的视频| 欧美在线免费视屏| 日韩一级二级三级| 国产亚洲成av人在线观看导航| 国产日韩综合av| 一区二区在线观看av| 亚洲午夜影视影院在线观看| 日韩avvvv在线播放| 极品瑜伽女神91| 波多野结衣视频一区| 欧美在线观看视频在线| 日韩手机在线导航| 国产精品女主播av| 亚洲大片免费看| 精品一区二区影视| 91亚洲国产成人精品一区二区三 | 欧美日韩国产另类不卡| 精品电影一区二区三区 | 大陆成人av片| 欧美日本韩国一区二区三区视频| 精品福利一二区| 亚洲丝袜另类动漫二区| 免费精品视频在线| 96av麻豆蜜桃一区二区| 日韩欧美国产一区二区三区| 国产精品对白交换视频 | 成人妖精视频yjsp地址| 欧美色图激情小说| 26uuu国产电影一区二区| 亚洲欧美视频在线观看视频| 久久疯狂做爰流白浆xx| 在线视频观看一区| 国产天堂亚洲国产碰碰| 亚洲成a人v欧美综合天堂| 国产一区二区影院| 欧美日韩极品在线观看一区| 国产精品美女久久久久久久久久久| 亚洲电影一区二区| 成人黄色网址在线观看| 欧美mv和日韩mv国产网站| 亚洲精品成a人| 国产精品系列在线播放| 欧美一级片在线看| 亚洲人成网站影音先锋播放| 国产麻豆精品一区二区| 在线不卡一区二区| 一区二区三区在线播放| 成人性色生活片| 日韩一级高清毛片| 午夜免费欧美电影| 在线视频你懂得一区| 国产精品久久久久影院| 韩国三级在线一区| 91精品欧美久久久久久动漫| 成人免费视频在线观看| 成人性视频网站| 精品国产百合女同互慰| 日韩专区欧美专区| 欧洲激情一区二区| 亚洲色图清纯唯美| 成人激情小说网站| 久久九九国产精品| 国产精品一区二区久久不卡| 日韩欧美亚洲国产精品字幕久久久| 亚洲最大成人网4388xx| 日本韩国精品在线| 亚洲精品欧美专区| 91香蕉国产在线观看软件| 国产精品久久久一区麻豆最新章节| 国产一区二区免费在线| 精品国产成人系列| 国精产品一区一区三区mba桃花 | 国产亚洲欧美激情| 国产一二三精品| 久久久精品tv| 国产一区 二区 三区一级| 亚洲精品在线网站| 国产精品原创巨作av| 久久综合久久99| 国产一区二区三区四| 国产亚洲成av人在线观看导航| 色综合久久中文字幕| 亚洲男人的天堂一区二区| 91免费小视频| 亚洲精品视频在线| 色噜噜狠狠色综合中国| 亚洲美女偷拍久久| 欧美中文字幕一区| 视频一区中文字幕国产| 9191精品国产综合久久久久久| 香蕉成人啪国产精品视频综合网| 欧美日韩和欧美的一区二区| 日本成人在线不卡视频| 精品美女一区二区| 国产在线视频一区二区| 国产无人区一区二区三区| 大桥未久av一区二区三区中文| 中文字幕在线播放不卡一区| 色猫猫国产区一区二在线视频| 亚洲国产裸拍裸体视频在线观看乱了| 欧美日高清视频| 久久精品99久久久| 国产精品天美传媒| 欧美艳星brazzers| 日本不卡的三区四区五区| 欧美精品一区在线观看| 高清视频一区二区| 亚洲一区影音先锋| 日韩免费高清av| 成人av在线看| 五月激情丁香一区二区三区| 久久综合九色综合久久久精品综合 | 一区二区三区在线视频播放| 色美美综合视频| 日本vs亚洲vs韩国一区三区| 国产亚洲精品超碰| 欧美午夜理伦三级在线观看| 蜜臀久久久久久久| 国产亚洲成aⅴ人片在线观看| 99精品久久只有精品| 日韩黄色在线观看| 国产偷国产偷精品高清尤物| 色国产综合视频| 看国产成人h片视频| 亚洲欧美一区二区三区久本道91 | 国产精品69毛片高清亚洲| 亚洲摸摸操操av| 日韩一区二区三区观看| 国v精品久久久网| 亚洲午夜av在线| 久久精品视频在线免费观看 | 日本一区二区不卡视频| 一本色道**综合亚洲精品蜜桃冫| 免播放器亚洲一区| ...av二区三区久久精品| 日韩手机在线导航| 一本色道久久加勒比精品| 久色婷婷小香蕉久久| 亚洲精品免费在线| 日韩欧美一区二区免费| 91在线看国产| 成人av网址在线观看| 免播放器亚洲一区| 亚洲另类色综合网站| 国产亚洲综合在线| 欧美日韩mp4| 91欧美激情一区二区三区成人| 久久精品国产精品青草| 亚洲九九爱视频| 久久青草国产手机看片福利盒子| 在线观看日韩一区| 成人精品视频.| 激情都市一区二区| 亚洲专区一二三| 国产精品卡一卡二卡三| 精品少妇一区二区三区日产乱码 | 国产日韩欧美精品一区| 日韩亚洲电影在线| 欧美日韩精品电影| 欧洲日韩一区二区三区| 成人av午夜影院| 丁香五精品蜜臀久久久久99网站| 蜜臀久久99精品久久久画质超高清| 亚洲国产综合视频在线观看| 最新欧美精品一区二区三区| 国产午夜久久久久| 欧美精品一区二区三区蜜臀| 欧美一区二区三区免费大片| 欧美午夜电影网| 色中色一区二区| 色婷婷一区二区| 91麻豆精品秘密| 丁香桃色午夜亚洲一区二区三区| 国产一区二区三区最好精华液| 麻豆精品一区二区| 蜜桃av一区二区| 久久国产精品无码网站| 日韩av一级片|