Add charset parameter to parse method.
[arachne.git] / src / net / pterodactylus / arachne / parser / Parser.java
index 28d8706..17b7e9c 100644 (file)
@@ -3,6 +3,7 @@
  */
 package net.pterodactylus.arachne.parser;
 
+import java.io.IOException;
 import java.io.InputStream;
 
 /**
@@ -21,7 +22,13 @@ public interface Parser {
         *            The listener to send events to
         * @param inputStream
         *            The input stream to parse
+        * @param charset
+        *            The charset to use for parsing, or <code>null</code> if the
+        *            charset is unknown or the file is “binary” file, i.e. not
+        *            characters are read from it but bytes (e.g. image files)
+        * @throws IOException
+        *             if an I/O error occurs
         */
-       public void parse(ParserListener parserListener, InputStream inputStream);
+       public void parse(ParserListener parserListener, InputStream inputStream, String charset) throws IOException;
 
 }