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

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

?? filternewline.java

?? 這是學習Java必須讀懂兩套源代碼
?? 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 java.util.*;

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

/**
 * A ForumMessageFilter that converts newline characters into HTML &lt;br&gt; tags.
 * This filter should only be run after any HTML stripping filters.
 */
public class FilterNewline extends ForumMessageFilter {

    private static final String BR_TAG = "<BR>";

    /**
     * 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 FilterNewline() {
        super();
        this.props = new Properties();
        this.propDescriptions = new Properties();
    }

    /**
     * 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 FilterNewline(ForumMessage message, Properties props,
            Properties propDescriptions)
    {
        super(message);
        this.props = new Properties(props);
        this.propDescriptions = new Properties(propDescriptions);
    }

    /**
     * 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 FilterNewline(message, props, propDescriptions);
    }

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

    /**
     * Returns a description of the filter.
     */
    public String getDescription() {
        return "Replaces newline characters with the &lt;br&gt; HTML tag.";
    }

    /**
     * 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() {
        //No properties so return null.
        return null;
    }

    /**
     * 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 the message with newline
     * characters converted to &ltbr&gt HTML tags.
     */
    public String getBody() {
        if (message.getBody() == null) {
            return null;
        }
        return convertNewlines(message.getBody());
    }

    /**
    * This method takes a string which may contain newline characters
    * '\n' which it converts to html newline tags.
    *
    * @param input The text to be converted.
    * @return The input string with the newline character '\n' replaced
    * with <br>.
    */
    private String convertNewlines( String input ) {
        String result = StringUtils.replace(input, "\r\n", BR_TAG);
        return StringUtils.replace(result, "\n", BR_TAG);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产视频网站| 激情综合五月婷婷| 亚洲欧美激情小说另类| 一本大道综合伊人精品热热| 亚洲a一区二区| 欧美成人乱码一区二区三区| 国产乱色国产精品免费视频| 国产欧美一区二区精品仙草咪| 久久网站最新地址| 91麻豆国产香蕉久久精品| 亚洲永久精品大片| 久久久午夜电影| 欧美色老头old∨ideo| 国产在线日韩欧美| 亚洲免费成人av| 精品久久人人做人人爱| 91福利视频久久久久| 国产一区二区中文字幕| 亚洲成a人v欧美综合天堂下载 | 肉色丝袜一区二区| 92精品国产成人观看免费| 亚洲国产色一区| 中文在线一区二区| 欧美无人高清视频在线观看| 懂色一区二区三区免费观看| 日本不卡中文字幕| 尤物在线观看一区| 亚洲视频一二三区| 国产精品成人免费| 欧美国产精品中文字幕| 欧美精品一区二区三区蜜桃视频| 欧美体内she精高潮| 在线亚洲一区二区| 91蜜桃在线免费视频| 91麻豆国产精品久久| 99精品视频一区二区| 成人h动漫精品一区二区| 国产jizzjizz一区二区| 成人国产视频在线观看| eeuss鲁片一区二区三区在线观看| 黄色日韩三级电影| 99久久99久久精品免费观看| jlzzjlzz国产精品久久| 日本亚洲免费观看| 蜜臀av一区二区三区| 国产美女久久久久| 日本高清视频一区二区| 在线成人av影院| 日本一区二区三区视频视频| 国产精品久久久久永久免费观看| 亚洲欧洲www| 麻豆精品久久精品色综合| 成人一区二区三区视频在线观看| 国产a精品视频| 欧美日高清视频| 精品噜噜噜噜久久久久久久久试看| 久久男人中文字幕资源站| 中文无字幕一区二区三区| 一级女性全黄久久生活片免费| 日日夜夜免费精品| 成人免费毛片app| 精品国产91洋老外米糕| 午夜精品久久一牛影视| 丰满亚洲少妇av| 久久精品一区四区| 久久精品国产亚洲aⅴ| 欧美日本乱大交xxxxx| 亚洲精品视频在线观看网站| 精彩视频一区二区| 91精品国产乱码久久蜜臀| 国产精品美女久久久久久2018| 亚洲资源在线观看| 欧美系列亚洲系列| 亚洲裸体xxx| 色综合咪咪久久| 一级女性全黄久久生活片免费| 成人美女在线视频| ...中文天堂在线一区| 色综合网色综合| 亚洲国产精品久久久久婷婷884| 欧美在线色视频| 蜜桃传媒麻豆第一区在线观看| 91精品午夜视频| 国产综合色在线| 国产精品久久久久久久久果冻传媒| 高清不卡一区二区在线| 中文字幕精品一区二区精品绿巨人| 色综合激情五月| 亚洲男人的天堂一区二区| 在线免费观看一区| 麻豆视频观看网址久久| 欧美一级日韩不卡播放免费| 美女www一区二区| 亚洲欧洲性图库| 日韩亚洲欧美综合| www.亚洲色图.com| 日本三级韩国三级欧美三级| 日韩免费在线观看| 欧美在线一区二区| 国产成人在线色| 亚洲国产精品自拍| 26uuu久久综合| 欧美日韩国产高清一区二区| 国产aⅴ综合色| 精品一区二区三区日韩| 五月婷婷另类国产| 亚洲精品视频一区二区| 欧美高清在线一区二区| 亚洲精品在线免费播放| 在线播放国产精品二区一二区四区 | 欧美一区二区三区爱爱| 99久久伊人久久99| 国产精品91一区二区| 精品一区二区三区免费播放| 亚洲不卡在线观看| 午夜精品久久久久久久99水蜜桃| 国产精品美女一区二区三区| 国产人成一区二区三区影院| 精品少妇一区二区三区视频免付费 | 亚洲欧美一区二区在线观看| 国产午夜一区二区三区| 国产日韩欧美高清| 国产三级三级三级精品8ⅰ区| 精品国产乱码久久久久久夜甘婷婷 | 国产成人啪免费观看软件| 蜜桃av一区二区在线观看| 日韩电影在线观看网站| 久久99国产精品久久99| 国产91在线看| 欧美三级在线播放| 日韩欧美高清一区| 中文字幕在线不卡视频| 亚洲电影一区二区| 成人免费视频视频| 91精品久久久久久久久99蜜臂| 久久人人爽爽爽人久久久| 国产欧美va欧美不卡在线| 一区二区三区在线视频观看| 亚洲成人www| 91亚洲精品一区二区乱码| 欧美一级黄色大片| 亚洲精品视频在线观看免费| 国内精品久久久久影院薰衣草| 国产一区二区三区四区在线观看| 一本大道久久a久久精二百| 日韩一区二区电影网| 亚洲柠檬福利资源导航| 国产一区美女在线| 91精品国产色综合久久不卡电影 | 久久国产夜色精品鲁鲁99| 色婷婷久久综合| 国产精品久久午夜| 亚洲一区二区精品久久av| 色天天综合色天天久久| 91国产成人在线| 欧美韩日一区二区三区| 国产在线精品一区二区三区不卡| 色婷婷亚洲综合| 亚洲欧美在线视频观看| 精久久久久久久久久久| 日韩欧美成人一区二区| 三级亚洲高清视频| 欧美日韩午夜在线视频| 一区二区高清视频在线观看| 99久久99久久精品免费看蜜桃| 国产精品免费av| 色天天综合久久久久综合片| 亚洲视频一区二区在线| 色综合 综合色| 三级在线观看一区二区| 精品噜噜噜噜久久久久久久久试看| 激情图片小说一区| 欧美极品美女视频| 色屁屁一区二区| 日韩国产一区二| 国产日韩欧美电影| 欧美日韩一区高清| 国产伦精品一区二区三区免费| 日本一区二区免费在线观看视频 | 18成人在线视频| 欧美丝袜丝交足nylons图片| 精品一区二区三区在线播放视频| 国产偷国产偷精品高清尤物 | 国产一区美女在线| 伊人一区二区三区| 国产片一区二区三区| 国产精品亚洲视频| 亚洲成人av一区二区三区| 国产欧美日本一区二区三区| 欧美精品日韩一区| 色域天天综合网| 91在线视频免费观看| 国产美女视频一区| 欧美a一区二区| 五月激情综合色| 亚洲一级二级三级| 亚洲午夜久久久| 亚洲柠檬福利资源导航| 亚洲免费看黄网站| 亚洲欧美日韩国产手机在线 |