Java SAXParser - keep InputStream open

I've a BufferedInputStream from which I want to parse XML with SAXParser but then reuse it again (eg. mark(int) & reset()). However this stream is closed in parse() method. Is it possible to somehow tell SAXParser to leave it open? The last resort is to wrap this stream with un-closeable stream.

Thank you.

Answers


How about something like:

class WontCloseBufferedInputStream extends BufferedInputStream {
  public void close () {
    // Do nothing.
  }

  public void reallyClose() {
    super.close ();
  }
}

Need Your Help

XSD.exe missing nested properties

c# xslt xsd

I have a flattened XSD here:

What happens in STL<vector> when an element is removed from between?

c++ memory-management vector stl

Since the memory locations are contiguous for stl vector are rest of elements moved back by one step? How did the stl library writers implement it?

Tomcat: unpacked WAR vs packed WAR in docBase

java tomcat war

Tomcat can use both types - or directly from app.war file with:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.