From: David ‘Bombe’ Roden Date: Mon, 9 Mar 2009 20:03:12 +0000 (+0100) Subject: Add charset parameter to parse method. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b9d2c5c9d1f0c67d10f8ed8b4641e81118924f63;p=arachne.git Add charset parameter to parse method. --- diff --git a/src/net/pterodactylus/arachne/parser/HtmlEditorKitParser.java b/src/net/pterodactylus/arachne/parser/HtmlEditorKitParser.java index 7e9085d..45ba774 100644 --- a/src/net/pterodactylus/arachne/parser/HtmlEditorKitParser.java +++ b/src/net/pterodactylus/arachne/parser/HtmlEditorKitParser.java @@ -17,10 +17,10 @@ public class HtmlEditorKitParser implements Parser { /** * {@inheritdoc} * - * @see net.pterodactylus.arachne.parser.Parser#parse(net.pterodactylus.arachne.parser.ParserListener, - * java.io.InputStream) + * @see net.pterodactylus.arachne.parser.Parser#parse(ParserListener, + * InputStream, String) */ - public void parse(ParserListener parserListener, InputStream inputStream) { + public void parse(ParserListener parserListener, InputStream inputStream, String charset) throws IOException { } } diff --git a/src/net/pterodactylus/arachne/parser/Parser.java b/src/net/pterodactylus/arachne/parser/Parser.java index 28d8706..17b7e9c 100644 --- a/src/net/pterodactylus/arachne/parser/Parser.java +++ b/src/net/pterodactylus/arachne/parser/Parser.java @@ -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 null 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; }