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

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

?? xmlwritersupport.java

?? 水晶 ? ?  報表 ? ? ? 源碼
?? JAVA
字號:
/**
 * ========================================
 * JFreeReport : a free Java report library
 * ========================================
 *
 * Project Info:  http://www.object-refinery.com/jfreereport/index.html
 * Project Lead:  Thomas Morgner (taquera@sherito.org);
 *
 * (C) Copyright 2000-2003, by Simba Management Limited and Contributors.
 *
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * ------------------------------
 * XMLWriterSupport.java
 * ------------------------------
 * (C)opyright 2003, by Thomas Morgner and Contributors.
 *
 * Original Author:  Thomas Morgner;
 * Contributor(s):   David Gilbert (for Simba Management Limited);
 *
 * $Id: XMLWriterSupport.java,v 1.1 2003/07/12 13:29:04 taqua Exp $
 *
 * Changes
 * -------------------------
 * 21.06.2003 : Initial version
 *
 */

package org.jfree.xml.writer;

import java.io.Writer;
import java.io.IOException;
import java.util.Properties;
import java.util.Enumeration;

public class XMLWriterSupport {

    /** A int constant for controling the indent function. */
    protected static final int OPEN_TAG_INCREASE = 1;
    /** A int constant for controling the indent function. */
    protected static final int CLOSE_TAG_DECREASE = 2;
    /** A int constant for controling the indent function. */
    protected static final int INDENT_ONLY = 3;

    /** A constant for close. */
    public static final boolean CLOSE = true;

    /** A constant for open. */
    public static final boolean OPEN = false;

    /** The line separator. */
    private static String lineSeparator;

    /** A list of safe tags. */
    private SafeTagList safeTags;

    /** The indent level for that writer. */
    private int indentLevel;

    private String indentString;

    public XMLWriterSupport(SafeTagList safeTags, int indentLevel) {
        this(safeTags, indentLevel, "    ");
    }

    public XMLWriterSupport(SafeTagList safeTags, int indentLevel, String indentString) {
        if (indentString == null) {
            throw new NullPointerException("IndentString must not be null");
        }

        this.safeTags = safeTags;
        this.indentLevel = indentLevel;
        this.indentString = indentString;
    }


    /**
     * Returns the line separator.
     *
     * @return The line separator.
     */
    public static String getLineSeparator() {
        if (lineSeparator == null) {
            try {
                lineSeparator = System.getProperty("line.separator", "\n");
            }
            catch (SecurityException se) {
                lineSeparator = "\n";
            }
        }
        return lineSeparator;
    }

    /**
     * Writes an opening XML tag that has no attributes.
     *
     * @param w  the writer.
     * @param name  the tag name.
     *
     * @throws java.io.IOException if there is an I/O problem.
     */
    public void writeTag(Writer w, String name) throws IOException {
        indent(w, OPEN_TAG_INCREASE);

        w.write("<");
        w.write(name);
        w.write(">");
        if (getSafeTags().isSafeForOpen(name)) {
            w.write(getLineSeparator());
        }
    }

    /**
     * Writes a closing XML tag.
     *
     * @param w  the writer.
     * @param tag  the tag name.
     *
     * @throws java.io.IOException if there is an I/O problem.
     */
    public void writeCloseTag(Writer w, String tag) throws IOException {
        // check whether the tag contains CData - we ma not indent such tags
        if (getSafeTags().isSafeForOpen(tag)) {
            indent(w, CLOSE_TAG_DECREASE);
        }
        else {
            decreaseIndent();
        }
        w.write("</");
        w.write(tag);
        w.write(">");
        if (getSafeTags().isSafeForClose(tag)) {
            w.write(getLineSeparator());
        }
    }

    /**
     * Writes an opening XML tag with an attribute/value pair.
     *
     * @param w  the writer.
     * @param name  the tag name.
     * @param attributeName  the attribute name.
     * @param attributeValue  the attribute value.
     * @param close  controls whether the tag is closed.
     *
     * @throws java.io.IOException if there is an I/O problem.
     */
    public void writeTag(Writer w, String name, String attributeName, String attributeValue,
                         boolean close) throws IOException {
        Properties attr = new Properties();
        attr.setProperty(attributeName, attributeValue);
        writeTag(w, name, attr, close);
    }

    /**
     * Writes an opening XML tag along with a list of attribute/value pairs.
     *
     * @param w  the writer.
     * @param name  the tag name.
     * @param attributes  the attributes.
     * @param close  controls whether the tag is closed.
     *
     * @throws java.io.IOException if there is an I/O problem.
     */
    public void writeTag(Writer w, String name, Properties attributes, boolean close)
        throws IOException {
        indent(w, OPEN_TAG_INCREASE);

        w.write("<");
        w.write(name);
        Enumeration keys = attributes.keys();
        while (keys.hasMoreElements()) {
            String key = (String) keys.nextElement();
            String value = attributes.getProperty(key);
            w.write(" ");
            w.write(key);
            w.write("=\"");
            w.write(normalize(value));
            w.write("\"");
        }
        if (close) {
            w.write("/>");
            if (getSafeTags().isSafeForClose(name)) {
                w.write(getLineSeparator());
            }
            decreaseIndent();
        }
        else {
            w.write(">");
            if (getSafeTags().isSafeForOpen(name)) {
                w.write(getLineSeparator());
            }
        }
    }

    /**
     * Normalises a string, replacing certain characters with their escape sequences so that
     * the XML text is not corrupted.
     *
     * @param s  the string.
     *
     * @return The normalised string.
     */
    public static String normalize(String s) {
        StringBuffer str = new StringBuffer();
        int len = (s != null) ? s.length() : 0;

        for (int i = 0; i < len; i++) {
            char ch = s.charAt(i);

            switch (ch) {
                case '<':
                    {
                        str.append("&lt;");
                        break;
                    }
                case '>':
                    {
                        str.append("&gt;");
                        break;
                    }
                case '&':
                    {
                        str.append("&amp;");
                        break;
                    }
                case '"':
                    {
                        str.append("&quot;");
                        break;
                    }
                case '\n':
                    {
                        if (i > 0) {
                            char lastChar = str.charAt(str.length() - 1);

                            if (lastChar != '\r') {
                                str.append(getLineSeparator());
                            }
                            else {
                                str.append('\n');
                            }
                        }
                        else {
                            str.append(getLineSeparator());
                        }
                        break;
                    }
                default :
                    {
                        str.append(ch);
                    }
            }
        }

        return (str.toString());
    }

    /**
     * Indent the line. Called for proper indenting in various places.
     *
     * @param writer the writer which should receive the indentention.
     * @param increase the current indent level.
     * @throws java.io.IOException if writing the stream failed.
     */
    protected void indent(Writer writer, int increase) throws IOException {
        if (increase == CLOSE_TAG_DECREASE) {
            decreaseIndent();
        }
        for (int i = 0; i < indentLevel; i++) {
            writer.write(indentString); // 4 spaces, we could also try tab,
            // but I do not know whether this works
            // with our XML edit pane
        }
        if (increase == OPEN_TAG_INCREASE) {
            increaseIndent();
        }
    }

    /**
     * Returns the current indent level.
     *
     * @return the current indent level.
     */
    public int getIndentLevel() {
        return indentLevel;
    }

    /**
     * Increases the indention by one level.
     */
    protected void increaseIndent() {
        indentLevel++;
    }

    /**
     * Decreates the indention by one level.
     */
    protected void decreaseIndent() {
        indentLevel--;
    }

    public SafeTagList getSafeTags() {
        return safeTags;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费不卡在线视频| 在线视频综合导航| 国产精品久久久一本精品 | 91污在线观看| 香蕉av福利精品导航| 欧美va在线播放| 一本一道综合狠狠老| 蜜桃在线一区二区三区| 亚洲国产高清aⅴ视频| 在线不卡的av| bt欧美亚洲午夜电影天堂| 日韩一区精品视频| 亚洲婷婷综合久久一本伊一区| 欧美日韩1234| 色老汉一区二区三区| 国产伦精品一区二区三区免费| 亚洲一区二区三区四区在线| 久久久久国产精品麻豆ai换脸| 欧美日高清视频| 欧美日本在线视频| 欧美色图免费看| 97久久精品人人澡人人爽| 精品一区二区三区在线观看| 亚洲国产精品自拍| 亚洲成人在线网站| 亚洲一级二级在线| 亚洲国产成人高清精品| 亚洲综合小说图片| 有码一区二区三区| 丝袜美腿成人在线| 日本不卡视频在线观看| 免费日本视频一区| 国内精品写真在线观看| 精品一区中文字幕| 成人精品免费看| 91在线观看污| 欧美三级三级三级| 欧美大片在线观看一区| 久久久久国产一区二区三区四区| 久久久久久久久蜜桃| 亚洲免费在线电影| 男男视频亚洲欧美| 成人精品视频.| 欧美日韩一区二区三区四区五区| 欧美日韩免费电影| 中文一区二区在线观看| 亚洲国产精品一区二区久久恐怖片| 亚洲一区二区三区视频在线播放| 天堂久久一区二区三区| 国产一区二区三区不卡在线观看 | 日韩精品电影在线| 国产91清纯白嫩初高中在线观看| 成人自拍视频在线观看| 欧美在线三级电影| 国产亚洲一区二区在线观看| 国产精品私人影院| 九一久久久久久| 91在线视频免费91| 精品三级在线观看| 亚洲成人一二三| www.综合网.com| 久久综合色播五月| 日韩成人一区二区| 欧美日韩精品一区二区三区蜜桃| 欧美激情一区二区三区不卡| 欧美一区二区精品在线| 不卡的看片网站| 欧美亚洲综合在线| 天天影视涩香欲综合网| 欧美怡红院视频| 亚洲欧美日本韩国| 91久久精品一区二区三区| 亚洲色图视频免费播放| 99久久久无码国产精品| 国产精品私房写真福利视频| 成人av午夜电影| 午夜a成v人精品| 精品久久国产老人久久综合| 日韩在线播放一区二区| 日韩精品一区二区三区蜜臀 | 中文字幕中文乱码欧美一区二区| 国产精品影音先锋| 国产日产精品1区| 日本韩国欧美一区| 麻豆精品一二三| 亚洲天堂2014| 欧美videossexotv100| 成人免费视频一区| 亚洲成a人片综合在线| 久久精品亚洲麻豆av一区二区| 91社区在线播放| 国产精品一区一区| 日本亚洲最大的色成网站www| 久久精品一区四区| 欧美日韩黄视频| 成人app在线观看| 国产精品白丝jk白祙喷水网站| 亚洲免费资源在线播放| 久久精品一区二区三区不卡| 日本福利一区二区| av电影在线观看不卡| 午夜精品在线看| 国产精品无码永久免费888| 日韩欧美一区中文| 欧美一区永久视频免费观看| 国产一区999| 日韩中文字幕不卡| 麻豆91免费观看| 久久精品国内一区二区三区| 亚洲国产视频一区| 免费精品99久久国产综合精品| 亚洲午夜电影在线| 日本不卡中文字幕| 免费精品视频在线| 国产精品一区在线| 成人av高清在线| 国产精品一区三区| 99re热这里只有精品免费视频| 成人免费看片app下载| 波多野结衣精品在线| 在线影院国内精品| 911精品国产一区二区在线| 777午夜精品免费视频| 777色狠狠一区二区三区| 久久婷婷一区二区三区| 自拍av一区二区三区| 香蕉久久一区二区不卡无毒影院| 免费观看日韩av| 99精品在线观看视频| 欧美一二三在线| 日韩美女视频一区二区| 毛片一区二区三区| 成人网页在线观看| 欧美精品高清视频| 亚洲日穴在线视频| 亚洲一区国产视频| 国产成人在线影院| 日韩欧美在线综合网| 亚洲色图20p| 不卡高清视频专区| 国产午夜精品一区二区| 午夜精品爽啪视频| 日韩精品久久久久久| 9色porny自拍视频一区二区| 欧美va在线播放| 麻豆国产91在线播放| 欧美日韩国产系列| 亚洲精品视频在线观看免费| 国产成人精品影视| 久久精品男人天堂av| 国产一区二区影院| 日韩一级片网址| 日韩电影在线免费| 欧美www视频| 国产成人亚洲综合色影视| 久久综合五月天婷婷伊人| 捆绑调教一区二区三区| 欧美精品黑人性xxxx| 亚洲综合自拍偷拍| 精品一区二区久久久| 成人综合婷婷国产精品久久蜜臀| 91久久精品一区二区三| 欧美国产日产图区| 99视频在线观看一区三区| 亚洲免费观看高清完整版在线观看 | 自拍偷拍欧美激情| 69久久夜色精品国产69蝌蚪网| 亚洲成在人线免费| 国产亚洲精品精华液| 丁香婷婷深情五月亚洲| 亚洲欧美aⅴ...| 精品国产亚洲在线| 一本久久a久久免费精品不卡| 亚洲免费视频中文字幕| 精品久久久久久久久久久久久久久 | 在线欧美日韩精品| 黄网站免费久久| 调教+趴+乳夹+国产+精品| 久久久国产综合精品女国产盗摄| 91麻豆精品在线观看| 久草这里只有精品视频| 亚洲一级二级三级在线免费观看| 久久久不卡网国产精品二区 | 色噜噜久久综合| 国产精品羞羞答答xxdd| 日韩成人午夜电影| 亚洲成国产人片在线观看| 一区二区中文视频| 国产精品麻豆久久久| 国产亚洲1区2区3区| 欧美一区永久视频免费观看| 欧美揉bbbbb揉bbbbb| 在线国产亚洲欧美| 欧美色视频在线观看| 欧美在线|欧美| 欧美调教femdomvk| 欧美日韩在线播放一区| 精品视频1区2区| 日韩欧美亚洲国产精品字幕久久久| 欧美一区二区三区四区视频|