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

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

?? minml.java

?? 實現了一個基于j2me移動gps定位系統
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
// Copyright (c) 2000, 2001 The Wilson Partnership.
// All Rights Reserved.
// @(#)MinML.java, 1.7, 18th November 2001
// Author: John Wilson - tug@wilson.co.uk

/*
 * $Id: MinML.java 140 2007-10-05 07:17:58Z khanhlnq $
 * $URL: https://jvnmobilegis.googlecode.com/svn/trunk/src/uk/co/wilson/xml/MinML.java $
 * $Author: khanhlnq $
 * $Revision: 140 $
 * $Date: 2007-10-05 14:17:58 +0700 (Fri, 05 Oct 2007) $
 *
 * ====================================================================
 *
 * Copyright (C) 2006-2007 by JVNGIS
 *
 * All copyright notices regarding JVNMobileGIS MUST remain
 * intact in the Java codes and resource files.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Support can be obtained from project homepage at:
 * http://code.google.com/p/jvnmobilegis/
 *
 * Correspondence and Marketing Questions can be sent to:
 * khanh.lnq AT gmail.com
 * 
 * @version: 1.0
 * @author: Khanh Le
 * @Date Created: 22 Jun 2007
 */
package uk.co.wilson.xml;

/*
 * Copyright (c) 2000, 2001 John Wilson (tug@wilson.co.uk). All rights reserved.
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer. 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. All advertising materials mentioning features or use
 * of this software must display the following acknowledgement: This product
 * includes software developed by John Wilson. The name of John Wilson may not
 * be used to endorse or promote products derived from this software without
 * specific prior written permission. THIS SOFTWARE IS PROVIDED BY JOHN WILSON
 * ``AS IS'' AND ANY EXPRESS 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 JOHN WILSON 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
 */

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Writer;
import java.util.EmptyStackException;
import java.util.Stack;
import java.util.Vector;

import org.xml.sax.AttributeList;
import org.xml.sax.DTDHandler;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

import uk.org.xml.sax.DocumentHandler;
import uk.org.xml.sax.Parser;

/**
 * @author khanhlnq
 */
public class MinML implements Parser, Locator, DocumentHandler, ErrorHandler {

    private static final int endStartName = 0;
    private static final int emitStartElement = 1;
    private static final int emitEndElement = 2;
    private static final int possiblyEmitCharacters = 3;
    private static final int emitCharacters = 4;
    private static final int emitCharactersSave = 5;
    private static final int saveAttributeName = 6;
    private static final int saveAttributeValue = 7;
    private static final int startComment = 8;
    private static final int endComment = 9;
    private static final int incLevel = 10;
    private static final int decLevel = 11;
    private static final int startCDATA = 12;
    private static final int endCDATA = 13;
    private static final int processCharRef = 14;
    private static final int writeCdata = 15;
    private static final int exitParser = 16;
    private static final int parseError = 17;
    private static final int discardAndChange = 18;
    private static final int discardSaveAndChange = 19;
    private static final int saveAndChange = 20;
    private static final int change = 21;

    private static final int inSkipping = 0;
    public static final int inSTag = 1;
    public static final int inPossiblyAttribute = 2;
    public static final int inNextAttribute = 3;
    public static final int inAttribute = 4;
    public static final int inAttribute1 = 5;
    public static final int inAttributeValue = 6;
    public static final int inAttributeQuoteValue = 7;
    public static final int inAttributeQuotesValue = 8;
    public static final int inETag = 9;
    public static final int inETag1 = 10;
    public static final int inMTTag = 11;
    public static final int inTag = 12;
    public static final int inTag1 = 13;
    public static final int inPI = 14;
    public static final int inPI1 = 15;
    public static final int inPossiblySkipping = 16;
    public static final int inCharData = 17;
    public static final int inCDATA = 18;
    public static final int inCDATA1 = 19;
    public static final int inComment = 20;
    public static final int inDTD = 21;

    public MinML(final int initialBufferSize, final int bufferIncrement) {
        this.initialBufferSize = initialBufferSize;
        this.bufferIncrement = bufferIncrement;
    }

    public MinML() {
        this(256, 128);
    }

    private void parse(final Reader in) throws SAXException, IOException {
        final Vector attributeNames = new Vector();
        final Vector attributeValues = new Vector();

        final AttributeList attrs = new AttributeList() {

            public int getLength() {
                return attributeNames.size();
            }

            public String getName(final int i) {
                return (String) attributeNames.elementAt(i);
            }

            public String getType(final int i) {
                return "CDATA";
            }

            public String getValue(final int i) {
                return (String) attributeValues.elementAt(i);
            }

            public String getType(final String name) {
                return "CDATA";
            }

            public String getValue(final String name) {
                final int index = attributeNames.indexOf(name);

                return (index == -1) ? null : (String) attributeValues
                        .elementAt(index);
            }
        };

        final MinMLBuffer buffer = new MinMLBuffer(in);
        int currentChar, charCount = 0;
        int level = 0;
        int mixedContentLevel = -1;
        String elementName = null;
        String state = operands[inSkipping];

        this.lineNumber = 1;
        this.columnNumber = 0;

        try {
            while (true) {
                charCount++;

                //
                // this is to try and make the loop a bit faster
                // currentChar = buffer.read(); is simpler but is a bit slower.
                //
                currentChar = (buffer.nextIn == buffer.lastIn) ? buffer.read()
                        : buffer.chars[buffer.nextIn++];

                final int transition;

                if (currentChar > ']') {
                    transition = state.charAt(14);
                } else {
                    final int charClass = charClasses[currentChar + 1];

                    if (charClass == -1)
                        fatalError(
                                "Document contains illegal control character with value "
                                        + currentChar, this.lineNumber,
                                this.columnNumber);

                    if (charClass == 12) {
                        if (currentChar == '\r') {
                            currentChar = '\n';
                            charCount = -1;
                        }

                        if (currentChar == '\n') {
                            if (charCount == 0)
                                continue; // preceeded by '\r' so ignore

                            if (charCount != -1)
                                charCount = 0;

                            this.lineNumber++;
                            this.columnNumber = 0;
                        }
                    }

                    transition = state.charAt(charClass);
                }

                this.columnNumber++;

                final String operand = operands[transition >>> 8];

                switch (transition & 0XFF) {
                case endStartName:
                    // end of start element name
                    elementName = buffer.getString();
                    if (currentChar != '>' && currentChar != '/')
                        break; // change state to operand
                    // drop through to emit start element (we have no
                    // attributes)

                case emitStartElement:
                    // emit start element

                    final Writer newWriter = this.extDocumentHandler
                            .startElement(elementName, attrs, (this.tags
                                    .empty()) ? this.extDocumentHandler
                                    .startDocument(buffer) : buffer.getWriter());

                    buffer.pushWriter(newWriter);
                    this.tags.push(elementName);

                    attributeValues.removeAllElements();
                    attributeNames.removeAllElements();

                    if (mixedContentLevel != -1)
                        mixedContentLevel++;

                    if (currentChar != '/')
                        break; // change state to operand

                    // <element/> drop through

                case emitEndElement:
                    // emit end element

                    try {
                        final String begin = (String) this.tags.pop();

                        buffer.popWriter();
                        elementName = buffer.getString();

                        if (currentChar != '/' && !elementName.equals(begin)) {
                            fatalError("end tag </" + elementName
                                    + "> does not match begin tag <" + begin
                                    + ">", this.lineNumber, this.columnNumber);
                        } else {
                            this.documentHandler.endElement(begin);

                            if (this.tags.empty()) {
                                this.documentHandler.endDocument();
                                return;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃视频一区二区| 欧美日韩极品在线观看一区| 国产999精品久久| 欧美专区日韩专区| 国产丝袜欧美中文另类| 午夜精品久久一牛影视| 成人夜色视频网站在线观看| 欧美三级日本三级少妇99| 国产婷婷一区二区| 日av在线不卡| 91久久线看在观草草青青| 久久亚区不卡日本| 日韩精品成人一区二区在线| 97精品视频在线观看自产线路二| 日韩精品最新网址| 无吗不卡中文字幕| 99国产精品久久久| 国产精品色一区二区三区| 麻豆精品新av中文字幕| 欧美日韩一卡二卡三卡| 成人免费在线观看入口| 成人中文字幕在线| 久久午夜免费电影| 免费日韩伦理电影| 欧美日免费三级在线| 亚洲色图视频网站| 99热在这里有精品免费| 国产无遮挡一区二区三区毛片日本| 日本成人超碰在线观看| 欧美亚洲动漫精品| 一区二区三区欧美日| 色综合视频在线观看| 国产精品国产a| 成人黄色a**站在线观看| 久久久精品影视| 国产成人免费网站| 国产欧美一区二区三区在线看蜜臀 | 亚洲一区二区在线播放相泽| 国产资源精品在线观看| 精品久久久久一区| 韩国女主播成人在线观看| 欧美精品一区二区三区高清aⅴ| 蜜桃精品在线观看| 精品国产乱码久久久久久浪潮| 蜜臀av性久久久久蜜臀aⅴ四虎 | 日韩欧美国产不卡| 久久99精品久久久| 久久久久久久一区| 成人黄色在线网站| 亚洲日本电影在线| 欧美日韩二区三区| 美腿丝袜一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 国产乱码精品一品二品| 国产免费成人在线视频| 色综合久久88色综合天天6| 亚洲黄色免费网站| 日韩网站在线看片你懂的| 国产精品一级在线| 亚洲女性喷水在线观看一区| 欧美日高清视频| 欧美欧美午夜aⅴ在线观看| www国产精品av| 免费视频一区二区| 777色狠狠一区二区三区| 亚洲欧美国产77777| 成人av在线电影| 久久免费精品国产久精品久久久久| 青青草精品视频| 欧美伦理电影网| 亚洲综合一区二区三区| 91猫先生在线| 国产精品电影院| 国产99一区视频免费| 国产清纯白嫩初高生在线观看91| 久久99蜜桃精品| 日韩精品影音先锋| 久久电影国产免费久久电影| 日韩一区二区三区在线| 秋霞午夜鲁丝一区二区老狼| 欧美日本韩国一区| 欧美aa在线视频| 日韩欧美国产精品一区| 激情综合五月婷婷| 久久久蜜桃精品| 粉嫩av亚洲一区二区图片| 国产女主播视频一区二区| 国产成人av电影| 91精品国模一区二区三区| 麻豆成人av在线| 亚洲精品国产精华液| 国产香蕉久久精品综合网| 91精品国产综合久久精品麻豆| 99精品国产91久久久久久| 激情欧美一区二区| 婷婷开心久久网| 一区二区三区在线免费| 中文字幕欧美日韩一区| 精品国产sm最大网站| 欧美高清dvd| 欧洲国内综合视频| 91麻豆产精品久久久久久| 国产馆精品极品| 国内精品视频666| 日本不卡一二三| 午夜国产精品一区| 亚洲一区二区在线免费观看视频| 中文字幕一区三区| 国产精品免费丝袜| 欧美激情艳妇裸体舞| 久久精品亚洲精品国产欧美kt∨| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 精品一区二区三区在线观看国产| 亚洲成在线观看| 亚洲一级二级在线| 一区二区三区精品视频在线| 亚洲精品高清在线| 亚洲综合区在线| 亚洲国产成人精品视频| 亚洲国产乱码最新视频 | 亚洲欧洲国产日韩| 日本一区二区成人在线| 国产欧美一区二区三区沐欲| 久久久久亚洲蜜桃| 国产色综合一区| 久久精品一级爱片| 中文字幕一区免费在线观看| 日韩一区欧美小说| 亚洲综合视频在线观看| 午夜久久福利影院| 久久精品国产一区二区| 国内精品国产成人国产三级粉色 | 亚洲高清免费一级二级三级| 五月婷婷激情综合网| 免费成人在线视频观看| 狂野欧美性猛交blacked| 国产麻豆精品在线| 不卡一区在线观看| 91久久精品一区二区三区| 7777精品伊人久久久大香线蕉最新版| 欧美电影在线免费观看| 久久久久国产精品人| 亚洲欧洲无码一区二区三区| 亚洲最新视频在线播放| 青青草国产成人av片免费| 国产精一区二区三区| 色综合久久久久网| 日韩午夜在线影院| 国产精品素人视频| 亚洲综合色区另类av| 国产在线精品国自产拍免费| jizz一区二区| 欧美一区三区四区| 国产色婷婷亚洲99精品小说| 一个色综合网站| 久久99最新地址| 色欧美乱欧美15图片| 欧美电影免费观看高清完整版在| 亚洲一卡二卡三卡四卡无卡久久 | 国产色产综合色产在线视频| 一区二区三区免费网站| 精品一区二区在线免费观看| 91一区二区在线| 精品久久国产老人久久综合| 亚洲欧美精品午睡沙发| 激情综合网av| 欧美视频在线播放| 国产精品美女一区二区| 蜜桃精品在线观看| 欧美性一二三区| 国产精品网站导航| 久久99在线观看| 欧美日韩一区中文字幕| 国产精品无遮挡| 免费一级片91| 欧美亚洲免费在线一区| 欧美国产精品中文字幕| 蜜桃久久av一区| 欧美色中文字幕| 亚洲特黄一级片| 国产成人免费高清| 日韩一区二区电影| 亚洲国产一区二区三区青草影视| 成人午夜在线播放| 精品欧美一区二区久久| 天堂va蜜桃一区二区三区| 色综合天天综合在线视频| 欧美激情在线免费观看| 国产一区二区三区免费观看| 91精品国产一区二区| 午夜电影网一区| 欧美性xxxxxxxx| 亚洲一区二区精品3399| 色香蕉成人二区免费| 中文字幕中文字幕在线一区| 国产很黄免费观看久久| 国产亚洲1区2区3区| 国产乱码精品一区二区三区忘忧草| 精品国产欧美一区二区| 老司机精品视频线观看86|