OSDN Git Service

1066d51ae5816b413c0f75f6653bae9f96412cfe
[jindolf/JinParser.git] / src / main / java / jp / sourceforge / jindolf / parser / package-info.java
1 /*
2  * JinParser パッケージコメント
3  *
4  * このファイルは、SunJDK5.0以降に含まれるJavadoc用に用意された、
5  * 特別な名前を持つソースファイルです。
6  * このファイルはソースコードを含まず、
7  * パッケージコメントとパッケージ宣言のみが含まれます。
8  *
9  * License : The MIT License
10  * Copyright(c) 2009 olyutorskii
11  */
12
13 /**
14  * これは Jindolf プロジェクトにおける、
15  * XHTML文書のパース部分を構成するパッケージです。
16  *
17  * <p>
18  * JinParserライブラリは、CGIゲーム「人狼BBS」のクライアント制作者向けに
19  * 作られたJavaライブラリです。
20  * JinParserライブラリは、人狼BBSの専用クライアント開発プロジェクト
21  * 「Jindolf」から派生しました。
22  *
23  * <hr>
24  *
25  * <p>
26  * 任意のバイトストリームから、
27  * デコードエラー情報付き文字列{@code DecodedContent}を得るには、
28  * 次のようにします。
29  * <pre>
30  * {@code
31  * InputStream is = .....
32  * StreamDecoder decoder = new SjisDecoder();
33  * ContentBuilder builder = new ContentBuilder();
34  * decoder.setDecodeHandler(builder);
35  * try{
36  *     decoder.decode(is);
37  * }catch(IOException e){
38  *     // ERROR!
39  * }catch(DecodeException e){
40  *     // ERROR!
41  * }
42  * DecodedContent content = builder.getContent();
43  * }
44  * </pre>
45  *
46  * <p>
47  * このようにして得られた文字列をパースして、
48  * あなたの実装したハンドラ{@code YourHandler}に通知するには、
49  * 以下のようにします。
50  * <pre>
51  * {@code
52  * HtmlParser parser = new HtmlParser();
53  * HtmlHandler handler = new YourHandler();
54  * parser.setBasicHandler(handler);
55  * parser.setTalkHandler(handler);
56  * parser.setSysEventHandler(handler);
57  * try{
58  *     parser.parseAutomatic(content);
59  * }catch(HtmlParseException e){
60  *     // ERROR!
61  * }
62  * }
63  * </pre>
64  *
65  * <p>
66  * ハンドラ内部で、パース元となった文字列の一部を切り出したい場合は、
67  * {@code EntityConverter}を使うのが便利です。
68  *
69  * <hr>
70  *
71  * <p>
72  * The MIT License
73  * <p>
74  * Copyright(c) 2009 olyutorskii
75  * <p>
76  * Permission is hereby granted, free of charge, to any person obtaining a
77  * copy of this software and associated documentation files (the "Software"),
78  * to deal in the Software without restriction, including without limitation
79  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
80  * and/or sell copies of the Software, and to permit persons to whom the
81  * Software is furnished to do so, subject to the following conditions:
82  * <p>
83  * The above copyright notice and this permission notice shall be included in
84  * all copies or substantial portions of the Software.
85  * <p>
86  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
87  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
89  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
90  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
91  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
92  * OTHER DEALINGS IN THE SOFTWARE.
93  * </p>
94  *
95  * <hr>
96  *
97  * @see <a href="http://jindolf.osdn.jp/">
98  * Jindolfポータルサイト</a>
99  * @see <a href="https://osdn.jp/projects/jindolf/devel/">
100  * Jindolf開発プロジェクト</a>
101  */
102
103 package jp.sourceforge.jindolf.parser;
104
105 /* EOF */