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

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

?? tabby.java

?? html解析包 可以很方便的解析html 純java 實現
?? JAVA
字號:
// HTMLParser Library $Name: v1_6_20051112 $ - A java-based parser for HTML// http://sourceforge.org/projects/htmlparser// Copyright (C) 2003 Derrick Oswald//// Revision Control Information//// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexerapplications/tabby/Tabby.java,v $// $Author: derrickoswald $// $Date: 2005/03/13 14:51:44 $// $Revision: 1.3 $//// 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//package org.htmlparser.lexerapplications.tabby;import java.io.File;import java.io.FileFilter;import java.io.FileInputStream;import java.io.FileOutputStream;import java.util.regex.Matcher;import java.util.regex.Pattern;import java.util.regex.PatternSyntaxException;import org.htmlparser.lexer.Cursor;import org.htmlparser.lexer.Page;/** * Replace tabs with spaces. * Convert tabs to the correct number of spaces according to a tabstop, * change DOS \r\n line endings to Unix \n form, and remove trailing whitespace */public class Tabby{    /**     * The default tab stop spacing.     */    private static final int DEFAULT_TABSTOP = 4;    /**     * The file filter to apply.     */    protected Filter mFilter;    /**     * The replacement tab stop size.     */    protected int mTabsize;    /**     * Creates a new instance of Tabby with no file filter and a tab stop of 4.     */    public Tabby ()    {        mFilter = null;        mTabsize = DEFAULT_TABSTOP;    }    /**     * Creates a new instance of Tabby using the given regular expression and     * a tab stop of 4.     * @param filter The regular expression to apply to the files searched.     */    public Tabby (final String filter)    {        this ();        mFilter = new Filter (filter);    }    /** Creates a new instance of Tabby.     * @param filter The regular expression to apply to the files searched.     * @param tabsize The tab stop setting.     * @exception IllegalArgumentException If tabsize is not a positive number.     */    public Tabby (final String filter, final int tabsize)        throws            IllegalArgumentException    {        this (filter);        if (0 >= tabsize)            throw new IllegalArgumentException ("tab size cannot be negative");        mTabsize = tabsize;    }    /**     * Process the file or directory.     * @param file The file to process.     */    protected void process (final File file)    {        File[] files;        if (file.isDirectory ())        {            files = file.listFiles (mFilter);            for (int i = 0; i < files.length; i++)                process (files[i]);        }        else            edit (file);    }    /**     * Process the file or directory.     * @param file The file to edit.     */    protected void edit (final File file)    {        FileInputStream in;        Page page;        Cursor cursor;        int position;        int expected;        boolean modified;        char ch;        int last;        StringBuffer buffer;        FileOutputStream out;        try        {            in = new FileInputStream (file);            buffer = new StringBuffer (in.available ());            try            {                page = new Page (in, null);                cursor = new Cursor (page, 0);                position = 0;                modified = false;                expected = 0;                last = -1;                while (Page.EOF != (ch = page.getCharacter (cursor)))                {                    if (++expected != cursor.getPosition ())                    {                        modified = true;                        expected = cursor.getPosition ();                    }                    if ('\t' == ch)                    {                        do                        {                            buffer.append (' ');                            position++;                        }                        while (0 != (position % mTabsize));                        modified = true;                    }                    else if ('\n' == ch)                    {                        // check for whitespace on the end of the line                        if (last + 1 != position)                        {                            // remove trailing whitespace                            last = buffer.length () - (position - last - 1);                            buffer.setLength (last);                            modified = true;                        }                        buffer.append (ch);                        position = 0;                        last = -1;                    }                    else                    {                        buffer.append (ch);                        if (!Character.isWhitespace (ch))                            last = position;                        position++;                    }                }            }            finally            {                in.close ();            }            if (modified)            {                System.out.println (file.getAbsolutePath ());                out = new FileOutputStream (file);                out.write (buffer.toString ().getBytes (Page.DEFAULT_CHARSET));                out.close ();            }        }        catch (Exception e)        {            System.out.println (e);        }    }    /**     * Implement a file filter.     */    class Filter implements FileFilter    {        /**         * The compiled expression.         */        protected Pattern mExpression;        /**         * Create a file filter from the regular expression.         * @param expression The <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html#sum">regular expression</a>.         * A useful regular expression is ".*\.java" which accepts all         * .java files.         * @exception IllegalArgumentException If the expression is         * <code>null</code>.         * @exception PatternSyntaxException If the expression is not a valid         * regular expression.         */        public Filter (final String expression)            throws                PatternSyntaxException        {            if (null == expression)                throw new IllegalArgumentException (                    "filter expression cannot be null");            mExpression = Pattern.compile (expression);        }        //        // FileFilter interface        //        /**         * Tests whether or not the file should be included in a pathname list.         * @param pathname The abstract pathname to be tested.         * @return <code>true</code> if and only if <code>pathname</code>         * should be included.         */        public boolean accept (final File pathname)        {            Matcher matcher;            boolean ret;            // match directories            if (pathname.isDirectory ())                ret = true;            else            {                matcher = mExpression.matcher (pathname.getAbsolutePath ());                ret = matcher.matches ();            }            return (ret);        }    }    /**     * Run Tabby on a file or directory.     * @param args The command line arguments.     * <PRE>     * args[0] The file or directory to work on.     * args[1] Optional, the regular expression to use as a file filter     * args[2] Optional, the tab stop setting (integer).     * </PRE>     */    public static void main (final String[] args)    {        Tabby tabby;        File file;        if (0 == args.length)            System.out.println (                  "usage: Tabby (<directory>|<file>)"                + " [file-match regexp] [tabsize]");        else        {            if (2 < args.length)                tabby = new Tabby (args[1], Integer.parseInt (args[2]));            else                if (1 < args.length)                    tabby = new Tabby (args[1]);                else                    tabby = new Tabby ();            file = new File (args[0]);            tabby.process (file);        }    }}/* * Revision Control Modification History * * $Log: Tabby.java,v $ * Revision 1.3  2005/03/13 14:51:44  derrickoswald * Bug #1121401 No Parsing with yahoo! * By default nio.charset.CharsetDecoder replaces characters it cannot * represent in the current encoding with zero, which was the value * returned by the page when the Stream reached EOF. * This changes the Page return value to (char)Source.EOF (-1) when * the end of stream is encountered. * * Revision 1.2  2004/07/31 16:42:34  derrickoswald * Remove unused variables and other fixes exposed by turning on compiler warnings. * * Revision 1.1  2003/09/10 03:38:26  derrickoswald * Add style checking target to ant build script: *     ant checkstyle * It uses a jar from http://checkstyle.sourceforge.net which is dropped in the lib directory. * The rules are in the file htmlparser_checks.xml in the src directory. * * Added lexerapplications package with Tabby as the first app. It performs whitespace manipulation * on source files to follow the style rules. This reduced the number of style violations to roughly 14,000. * * There are a few issues with the style checker that need to be resolved before it should be taken too seriously. * For example: * It thinks all method arguments should be final, even if they are modified by the code (which the compiler frowns on). * It complains about long lines, even when there is no possibility of wrapping the line, i.e. a URL in a comment * that's more than 80 characters long. * It considers all naked integers as 'magic numbers', even when they are obvious, i.e. the 4 corners of a box. * It complains about whitespace following braces, even in array initializers, i.e. X[][] = { {a, b} { } } * * But it points out some really interesting things, even if you don't agree with the style guidelines, * so it's worth a look. * * */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品电影院| 欧美一区二区三区成人| 久久9热精品视频| 亚洲成人综合在线| 亚洲综合无码一区二区| 亚洲精品高清在线| 亚洲三级在线播放| 亚洲三级电影全部在线观看高清| 国产精品萝li| 亚洲欧美日韩国产一区二区三区| 亚洲国产精品二十页| 国产精品久99| 一区二区日韩av| 五月开心婷婷久久| 亚洲bt欧美bt精品777| 午夜精品福利在线| 国内精品久久久久影院薰衣草| 美女视频免费一区| 懂色中文一区二区在线播放| 欧美精选一区二区| 一区二区三区波多野结衣在线观看 | 亚洲欧洲精品天堂一级| 国产视频视频一区| 亚洲天天做日日做天天谢日日欢 | 欧美日韩中文字幕一区| 欧美老人xxxx18| 2021国产精品久久精品| 亚洲日本免费电影| 日韩av电影天堂| 国产大陆亚洲精品国产| 欧美午夜在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 中文字幕中文在线不卡住| 五月婷婷综合在线| 成人免费视频国产在线观看| 本田岬高潮一区二区三区| 91精品免费观看| 国产精品国产三级国产普通话99 | 欧美国产精品一区二区| 一二三四区精品视频| 精品午夜一区二区三区在线观看 | 欧美三级视频在线| 久久亚洲综合av| 亚洲国产另类av| 国产成都精品91一区二区三| 欧美色大人视频| 中文字幕巨乱亚洲| 男女男精品视频| 欧美日免费三级在线| 国产女人aaa级久久久级| 日韩精品乱码av一区二区| 99riav一区二区三区| 久久一夜天堂av一区二区三区| 亚洲狠狠丁香婷婷综合久久久| 国产一区三区三区| 欧美一级国产精品| 亚洲一区视频在线| 色呦呦网站一区| 亚洲欧洲精品一区二区精品久久久| 午夜欧美在线一二页| 91啪亚洲精品| 国产精品成人免费| 国产美女精品人人做人人爽| 91精品国产色综合久久久蜜香臀| 亚洲精品乱码久久久久久| 成人av第一页| 中文字幕精品一区二区三区精品| 久久国产剧场电影| 日韩美女在线视频| 日日摸夜夜添夜夜添精品视频| 在线亚洲欧美专区二区| 亚洲欧洲无码一区二区三区| 丰满放荡岳乱妇91ww| 国产亚洲一区二区三区| 国产精一区二区三区| 国产喷白浆一区二区三区| 国产黄人亚洲片| 国产欧美日韩卡一| 粉嫩绯色av一区二区在线观看| 国产欧美日本一区二区三区| 国产精品一卡二卡在线观看| 国产精品网站在线播放| 成人永久aaa| 中文字幕永久在线不卡| 9l国产精品久久久久麻豆| 亚洲天堂精品在线观看| 99精品一区二区| 一区二区三区在线看| 欧美在线999| 日本午夜精品一区二区三区电影| 欧美日韩国产一区| 免费观看日韩电影| 久久午夜色播影院免费高清| www.色精品| 一区二区三区欧美| 欧美日本在线看| 国产精品自拍一区| 成人欧美一区二区三区白人| 欧美伊人精品成人久久综合97| 亚洲国产精品久久久久婷婷884 | 一本高清dvd不卡在线观看| 一区二区三区在线不卡| 91精品国产综合久久久蜜臀粉嫩 | 99精品热视频| 亚洲一区二区三区四区在线观看 | 国内精品视频一区二区三区八戒| 久久久久久久久97黄色工厂| 成人国产精品免费观看动漫| 一区二区三区日韩| 精品国产在天天线2019| 91麻豆国产香蕉久久精品| 视频一区视频二区中文| 欧美极品另类videosde| 欧美调教femdomvk| 国产福利视频一区二区三区| 亚洲午夜影视影院在线观看| 久久婷婷国产综合国色天香| 欧美在线免费播放| 国产一级精品在线| 日韩精品视频网站| 欧美国产综合一区二区| 欧美放荡的少妇| proumb性欧美在线观看| 美女视频一区在线观看| 亚洲综合区在线| 日本一区二区三区在线观看| 在线播放日韩导航| 91蜜桃婷婷狠狠久久综合9色| 激情五月婷婷综合| 视频一区视频二区中文| 亚洲猫色日本管| 国产亲近乱来精品视频| 欧美一区日韩一区| 在线精品视频免费播放| 不卡的av电影| 国产福利一区在线| 国产麻豆精品在线观看| 九九**精品视频免费播放| 首页欧美精品中文字幕| 一区二区三区国产精华| 国产精品久久久久久久久免费樱桃| 日韩欧美精品在线| 日韩一区二区三区高清免费看看 | 秋霞国产午夜精品免费视频| 亚洲免费在线观看视频| 国产精品国产三级国产| 国产精品网站在线播放| 国产欧美日韩另类一区| 久久久久久久久久久久电影| 日韩免费在线观看| 欧美mv日韩mv国产网站app| 这里只有精品99re| 日韩欧美一区二区免费| 欧美日韩免费高清一区色橹橹 | 国产**成人网毛片九色| 狠狠v欧美v日韩v亚洲ⅴ| 美洲天堂一区二卡三卡四卡视频| 日韩在线观看一区二区| 五月天一区二区| 日本午夜一区二区| 久热成人在线视频| 国精产品一区一区三区mba桃花 | 国产欧美va欧美不卡在线| 久久久久国产精品麻豆ai换脸 | 懂色av一区二区三区蜜臀| 国产精品一区免费在线观看| 高清国产一区二区| 99久久777色| 欧美色男人天堂| 欧美成人乱码一区二区三区| 久久亚洲综合av| 成人免费一区二区三区在线观看| 亚洲激情图片qvod| 亚洲chinese男男1069| 美女免费视频一区| 成人午夜免费电影| 99精品欧美一区二区三区小说| 色哟哟一区二区| 日韩视频123| 亚洲色欲色欲www| 亚洲h精品动漫在线观看| 国产一区二区三区在线观看免费| 成人一区二区三区视频| 欧美羞羞免费网站| 欧美xxxx在线观看| 亚洲欧洲制服丝袜| 日本va欧美va欧美va精品| www.亚洲免费av| 日韩一区二区在线看| 亚洲天堂网中文字| 久久精品国产成人一区二区三区| 99久久夜色精品国产网站| 欧美夫妻性生活| 中文一区一区三区高中清不卡| 性久久久久久久| 国产福利精品一区| 91精品国产91久久久久久最新毛片 | 麻豆精品在线看| 色吊一区二区三区| 日本一区二区三区电影|