Ruby runtime = context.runtime;
// FIXME? only supports Unicode, since we have to produces strings...
StreamReader reader;
if (target.respondsTo("read")) {
reader = new StreamReader(new InputStreamReader(new IOInputStream(target)));
} else {
reader = new StreamReader(new StringReader(target.convertToString().asJavaString()));
}
Parser parser = new ParserImpl(reader);
IRubyObject handler = getInstanceVariable("@handler");