protected void closeStream(Closeable stream) { try { if (stream != null) { stream.close(); } } catch (IOException ex) { JptJaxbCorePlugin.instance().logError(ex); } }
protected void load() { InputStream stream = null; try { stream = this.file.getContents(); if (stream != null) { this.load(new BufferedInputStream(stream)); } } catch (CoreException ce) { // workspace out of sync - no underlying file - simply don't load } catch (Exception ex) { JptJaxbCorePlugin.instance().logError(ex); } finally { this.closeStream(stream); } }