OSDN Git Service

topic/jiocema とマージ
[jindolf/JinParser.git] / src / main / java / jp / sourceforge / jindolf / parser / DecodeHandler.java
diff --git a/src/main/java/jp/sourceforge/jindolf/parser/DecodeHandler.java b/src/main/java/jp/sourceforge/jindolf/parser/DecodeHandler.java
deleted file mode 100644 (file)
index 7d12898..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * decode handler
- *
- * License : The MIT License
- * Copyright(c) 2009 olyutorskii
- */
-
-package jp.sourceforge.jindolf.parser;
-
-import java.nio.charset.CharsetDecoder;
-
-/**
- * 文字デコードハンドラ。
- * {@link StreamDecoder}により呼び出される。
- *
- * <p>デコード処理を通じてメソッドが呼ばれる順番は
- * {@link #startDecoding}が最初で
- * {@link #endDecoding}が最後。
- * その間、{@link #charContent}
- * または{@link #decodingError}が複数回呼ばれる。
- *
- * <p>各メソッドは、{@link DecodeException}をスローすることで
- * デコード処理を中止させることができる。
- */
-public interface DecodeHandler{
-
-    /**
-     * デコード処理開始の通知を受け取る。
-     *
-     * <p>渡された文字デコーダの各種設定を変更してはならない。
-     *
-     * @param decoder 文字デコーダ
-     * @throws DecodeException デコードエラー
-     */
-    void startDecoding(CharsetDecoder decoder)
-            throws DecodeException;
-
-    /**
-     * 正常にデコードした文字列の通知を受け取る。
-     *
-     * <p>seqの内容は、ハンドラ呼び出し元で随時変更されうる。
-     * seqの内容を後々再利用するつもりなら、
-     * 制御を呼び出し元に戻すまでの間に必要な箇所をコピーする必要がある。
-     *
-     * @param seq 文字列
-     * @throws DecodeException デコードエラー
-     */
-    void charContent(CharSequence seq)
-            throws DecodeException;
-
-    /**
-     * デコードエラーの通知を受け取る。
-     *
-     * <p>errorArrayの内容は、ハンドラ呼び出し元で随時変更されうる。
-     * errorArrayの内容を後々再利用するつもりなら、
-     * 制御を呼び出し元に戻すまでの間に必要な箇所をコピーする必要がある。
-     *
-     * @param errorArray エラーを引き起こした入力バイトシーケンス。
-     * @param offset errorArrayに含まれるエラーの開始位置。
-     * @param length errorArrayに含まれるエラーのバイト長。
-     * @throws DecodeException デコードエラー
-     */
-    void decodingError(byte[] errorArray, int offset, int length)
-            throws DecodeException;
-
-    /**
-     * デコード処理終了の通知を受け取る。
-     *
-     * @throws DecodeException デコードエラー
-     */
-    void endDecoding()
-            throws DecodeException;
-
-}