public void Load(Stream stream) { //FileInputStream stream = new FileInputStream(filePath); java.io.InputStream _javaStream = DroolsDotnetUtil.getJavaInputStreamFromSystemStream(stream); ObjectInput objInp = new ObjectInputStream(_javaStream); this._javaPackage.readExternal(objInp); _javaStream.close(); }
public Document build(InputStream inputStream) { try { var streamWrapper = new util.io.StreamWrapper(inputStream); TextReader textReader = new StreamReader(streamWrapper); var xDocument = XDocument.Load(textReader); inputStream.close(); return new Document(xDocument); } catch (Exception exception) { throw new ParsingException(exception); } }
private static void close(InputStream @in) { if (@in != null) { try { @in.close(); } catch (IOException e) { LOGGER.log(Level.WARNING, e.toString()); } } }