Eclipse - 重载方法无法识别

时间:2013-11-05 06:52:50

标签: java eclipse

这很奇怪,方法parseXHtml被重载并且存在参数列表(PdfWriter,Document,InputStreamReader,InputStreamReader)。我检查过javadoc,反编译jar等等,它就在那里!但是eclipse只是没有加载正确的那个!

  

XMLWorkerHelper类型中的方法parseXHtml(PdfWriter,Document,InputStream,Charset)不适用于参数(PdfWriter,Document,InputStreamReader,InputStreamReader)

    public void parseXHtml(PdfWriter writer, Document doc, InputStream in, InputStream inCssFile) throws IOException
    {
       parseXHtml(writer, doc, in, inCssFile, null, ((FontProvider) (new XMLWorkerFontProvider())));
    }

1 个答案:

答案 0 :(得分:1)

parseXHtml的最后两个参数分别为InputStreamCharset类型:

parseXHtml(PdfWriter, Document, InputStream, Charset)

将方法参数更改为:

public void parseXHtml(PdfWriter writer, Document doc, InputStream in, Charset charset) throws IOException
    {
     ...
    }