阅读背景:

在解析过程中,关闭SAX解析器正在读取的流的最佳方法是什么?

来源:互联网 

Let's get straight to my question: I have a socket and all input coming via this socket / stream is parsed by my SAX parser. Now, upon a certain parsing event I'd like to close the socket / stream from within my SAX event handler. Also, I want to close the stream from outside in a certain case while the parser is still working. Unfortunately, I can't do the one thing or the other without having an exception thrown by the parser (unexpected document ending...). Ok, I could catch this exception, but do you know a solution how to securely close the stream?Let's get straight to my question: I have a soc




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: