- changed status to resolved
OpenXml filter cannot be stopped before filtering is finsihed...
Original issue 402 created by @ysavourel on 2014-04-11T21:59:15.000Z:
Code like the snippet below will cause a "OkapiIOException: Can't read piped input." and WARN net.sf.okapi.filters.openxml.OpenXMLContentFilter - Problem writing piped stream.
It may take a few passes. In our code we were running a merge with the same filter (XLIFFMergingStep). I can provide more extensive code if the snippet below is not enough to reproduce the problem
RawDocument rd = null;
try
{
rd = new RawDocument(targetFile.toURI(), "UTF-8", srcLocale, trgLocale);
f.open(rd);
while(f.hasNext())
{
Event e = f.next();
if(e.isTextUnit() && !e.getTextUnit().isEmpty())
{
return true;
}
}
}
finally
{
if(rd != null) rd.close();
if(f != null) f.close();
}
return false;
Comments (1)
-
Account Deleted - Log in to comment
Comment 1. originally posted by @ysavourel on 2014-04-25T20:11:30.000Z:
This appears to be fixed with the latest resource factor and using INputStreamFromOutputStream