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

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

?? minml.java

?? 實現(xiàn)了一個基于j2me移動gps定位系統(tǒng)
?? 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一区二区三区免费野_久草精品视频
亚洲精品免费电影| 亚洲国产精品av| 不卡一区中文字幕| 国产a级毛片一区| 国产一区啦啦啦在线观看| 蜜桃视频一区二区| 韩国av一区二区| 国产一区二区精品久久99| 寂寞少妇一区二区三区| 精品一区二区三区av| 国产精品系列在线播放| 成人av免费在线| 色噜噜夜夜夜综合网| 欧亚一区二区三区| 欧美一区二区三区成人| 中文字幕va一区二区三区| 国产亚洲精品中文字幕| 国产精品久久久久久久午夜片| 国产精品私房写真福利视频| 国产精品国产自产拍在线| 亚洲一区二区免费视频| 日本系列欧美系列| 岛国精品在线观看| 日本精品免费观看高清观看| 3751色影院一区二区三区| 精品成人佐山爱一区二区| 亚洲欧洲日韩综合一区二区| 亚洲一级二级在线| 国产尤物一区二区在线| 99vv1com这只有精品| 欧美一级欧美一级在线播放| 欧美激情在线看| 亚洲午夜久久久久久久久久久| 美女性感视频久久| 91天堂素人约啪| 日韩一区二区中文字幕| 国产精品超碰97尤物18| 免费欧美高清视频| 色综合天天在线| 久久综合九色综合久久久精品综合 | 日韩美女视频19| 国内精品久久久久影院色 | 国产精品免费人成网站| 午夜精品久久久久久久99樱桃| 国产一区 二区| 欧美日韩国产美女| 1区2区3区精品视频| 久久99精品视频| 在线亚洲高清视频| 日本一区二区在线不卡| 美女尤物国产一区| 欧美人狂配大交3d怪物一区| 亚洲欧洲一区二区三区| 国产乱码精品一区二区三| 7777精品伊人久久久大香线蕉| 国产精品传媒入口麻豆| 国产美女视频91| 日韩欧美高清dvd碟片| 午夜亚洲国产au精品一区二区| 成人av网站在线观看| 久久久久久久精| 久久国产夜色精品鲁鲁99| 欧美中文字幕一区二区三区亚洲| 国产精品剧情在线亚洲| 国产精品18久久久久久vr| 精品国产一区二区亚洲人成毛片| 亚洲一区精品在线| 欧美综合在线视频| 亚洲美女电影在线| 91日韩在线专区| 国产精品传媒在线| 91在线视频网址| 亚洲免费观看在线观看| 91香蕉视频mp4| 亚洲香肠在线观看| 色综合天天视频在线观看| 中文字幕中文字幕中文字幕亚洲无线| 国模冰冰炮一区二区| 欧美成人video| 国产乱码一区二区三区| 国产亚洲精品资源在线26u| 国产91在线观看| 综合久久国产九一剧情麻豆| 99精品一区二区三区| 亚洲三级电影全部在线观看高清| 91亚洲精品一区二区乱码| 亚洲美女在线一区| 欧美群妇大交群中文字幕| 亚洲午夜在线电影| 欧美一个色资源| 国产精品一二三四区| 亚洲色图在线播放| 欧美男人的天堂一二区| 紧缚奴在线一区二区三区| 欧美国产成人在线| 在线免费av一区| 日韩高清在线观看| 国产区在线观看成人精品| 99精品国产99久久久久久白柏| 夜夜爽夜夜爽精品视频| 8v天堂国产在线一区二区| 国产一区三区三区| 亚洲激情综合网| 欧美一级高清片在线观看| 国产91丝袜在线播放0| 亚洲精品视频在线观看网站| 这里只有精品视频在线观看| 国内成人免费视频| 一区二区三区中文在线观看| 日韩亚洲国产中文字幕欧美| 成人av在线电影| 美女一区二区在线观看| 亚洲人成在线播放网站岛国| 91精品国产乱| 91麻豆高清视频| 精品制服美女久久| 亚洲国产一区二区三区| 久久久高清一区二区三区| 欧美一区二区三区影视| 国产成人av福利| 日本怡春院一区二区| 亚洲免费av在线| 久久亚洲精华国产精华液| 欧美亚洲国产怡红院影院| 国产不卡免费视频| 亚洲成人1区2区| 亚洲欧洲美洲综合色网| 日韩视频一区二区三区在线播放| 色素色在线综合| 成人丝袜视频网| 国产成人av影院| 久久99精品久久久久久| 亚洲大片一区二区三区| 亚洲视频一区在线观看| 久久久久久久久蜜桃| 日韩精品一区国产麻豆| 在线成人免费观看| 欧美在线一区二区三区| 97成人超碰视| 成人av午夜电影| 国产成人99久久亚洲综合精品| 麻豆国产欧美一区二区三区| 日韩精品亚洲一区二区三区免费| 亚洲女厕所小便bbb| 亚洲欧美日韩国产中文在线| 国产精品免费看片| 国产精品福利电影一区二区三区四区| 久久蜜桃香蕉精品一区二区三区| 日韩欧美黄色影院| 日韩欧美黄色影院| 欧美va天堂va视频va在线| 日韩一区二区三区观看| 91精品国产综合久久久久| 3d动漫精品啪啪一区二区竹菊| 欧美肥胖老妇做爰| 欧美一区二区三区电影| 欧美va亚洲va国产综合| 久久人人超碰精品| 国产精品成人一区二区艾草| 国产精品全国免费观看高清 | 国产69精品久久99不卡| 成人自拍视频在线观看| 色综合久久天天| 在线观看国产一区二区| 欧美三级视频在线观看| 欧美精品色综合| 亚洲国产成人午夜在线一区| 国产欧美一区二区在线| 国产精品乱码一区二区三区软件| 国产精品久久久久影院老司| 中文字幕中文乱码欧美一区二区| 亚洲欧美日韩中文播放| 亚洲国产成人va在线观看天堂| 日韩一区欧美二区| 极品少妇一区二区| av一二三不卡影片| 精品污污网站免费看| 久久久久免费观看| 亚洲三级在线看| 久久www免费人成看片高清| 国产成人精品网址| 欧美专区日韩专区| 久久品道一品道久久精品| 亚洲色图在线播放| 久久福利视频一区二区| av午夜一区麻豆| 欧美成人猛片aaaaaaa| 国产精品国产三级国产a| 日韩电影在线一区| 不卡高清视频专区| 制服丝袜av成人在线看| 国产精品三级av| 免费看精品久久片| 91精品办公室少妇高潮对白| 日韩欧美卡一卡二| 一区二区三区在线播放| 国产综合久久久久影院| 欧美性videosxxxxx| 国产精品美女一区二区| 免费观看在线色综合|