楼主这样都想得到^_^,有创意^_^
我说finally里面加try catch.我觉得行^_^(没试过,理论上应该行哈哈)

解决方案 »

  1.   

    public String get()
    {
    InputStream filecon = null ;
    try
    {
    filecon = fileurl.openStream();
    Content = extractor.extractText(filecon);
    }
    catch (IOException e)
    {
    System.out.println("OpenStream failed");
    }
    finally
    {
    try
    {
                                  if(filecon!=null)
       {
                                      filecon.close();
                                    }
    }
    catch(IOException e)
    {
       System.out.println("Close file failed");
    }

    }
    return Content;
    }
    xiusdf
      

  2.   

    对的,没有问题的.不过没看到fileurl的声明
      

  3.   

    谢谢大家,fileurl在外面有声明了。结贴,
      

  4.   

    finally的使用完全正确的,用了try也是非常对和必须的
      

  5.   

    finally里直接写filecon.close();
    就行了,没见过这样写。
      

  6.   

    对啊,就是这样的,你去网上看看关闭数据库连接的方式也是这样写的,在finally里写,还要try-catch异常的