charsetselftest.java
来自「一个搜索引擎,希望对大家有用」· Java 代码 · 共 62 行
JAVA
62 行
/* CharsetSelfTest * * Created on Mar 10, 2004 * * Copyright (C) 2004 Internet Archive. * * This file is part of the Heritrix web crawler (crawler.archive.org). * * Heritrix is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * any later version. * * Heritrix 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 Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with Heritrix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */package org.archive.crawler.selftest;import java.io.File;import java.util.Arrays;import java.util.List;/** * Simple test to ensure we can extract links from multibyte pages. * * That is, can we regex over a multibyte stream. * * @author stack * @version $Revision: 1.6 $, $Date: 2004/05/28 22:33:04 $ */public class CharsetSelfTest extends SelfTestCase{ /** * Files to find as a list. */ private static final List FILES_TO_FIND = Arrays.asList(new File[] {new File("utf8.jsp"), new File("shiftjis.jsp"), new File("charsetselftest_end.html")}); /** * Look for last file in link chain. * * The way the pages are setup under the CharsetSelfTest directory under * the webapp is that we have one multibyte page w/ a single link buried in * it that points off to another multibyte page. On the end of the link * chain is a page named END_OF_CHAIN_PAGE. This test looks to see that * arc has all pages in the chain. */ public void testCharset() { testFilesInArc(FILES_TO_FIND); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?