You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VTDGenHugevgh = newVTDGenHuge();
if (vgh.parseFile("c:/xml/text1.xml",true , VTDGenHuge.MEM_MAPPED)) {
VTDNavHugevnh = vgh.getNav();
vnh.toElement(VTDNavHuge.FC);
long[] la = vnh.getElementFragment();
vnh.getXML().writeToFileOutputStream(newFileOutputStream("c:/xml/text2.xml"), la[0], la[1]);
}
But since 2.12, it raise this error :
java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:110)
at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:588)
at com.ximpleware.extended.XMLMemMappedBuffer.writeToFileOutputStream(XMLMemMappedBuffer.java:104)
Hi there,
This code works as expected in 2.11 :
But since 2.12, it raise this error :
The line https://github.com/jzhang2004/vtd-xml/blob/master/ximple-dev/com/ximpleware/extended/VTDGenHuge.java#L927 close the FileChannel at the end of vgh.getNav();
Have a nice day !
The text was updated successfully, but these errors were encountered: