OSDN Git Service

入力ソースへのアクセスを可能に
authorOlyutorskii <olyutorskii@users.osdn.me>
Tue, 7 Jun 2011 00:32:58 +0000 (09:32 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Tue, 7 Jun 2011 00:32:58 +0000 (09:32 +0900)
src/main/java/jp/sourceforge/mikutoga/parser/CommonParser.java

index 6e3369a..819a986 100644 (file)
@@ -52,6 +52,23 @@ public class CommonParser {
     }
 
     /**
+     * 入力ソースを返す。
+     * @return 入力ソース
+     */
+    protected MmdSource getSource(){
+        return this.source;
+    }
+
+    /**
+     * 入力ソースの読み込み位置を返す。
+     * @return 入力ソースの読み込み位置。単位はbyte。
+     */
+    protected long getPosition(){
+        long result = this.source.getPosition();
+        return result;
+    }
+
+    /**
      * 入力ソースにまだデータが残っているか判定する。
      * @return まだ読み込んでいないデータが残っていればtrue
      * @throws IOException IOエラー