@Override public void close() { super.close(); hasUtf8Bom = false; hasUtf8Encoding = false; if (input != null) { input.close(); } }
@Override public void close() { super.close(); hasUtf8Bom = false; hasUtf8Encoding = false; if (input != null) { input.close(); } if (keyStack != null) { keyStack.clear(); } currentNodeType = YamlNodeTypes.UNKOWN; currentKey = null; }
/** * Close the filter and all used resources. */ public void close() { super.close(); this.hasUtf8Bom = false; this.hasUtf8Encoding = false; this.currentId = null; if (ruleState != null) { ruleState.reset(!getConfig().isGlobalPreserveWhitespace(), getConfig().isGlobalExcludeByDefault()); } if (currentRawDocument != null) { currentRawDocument.close(); } try { if (document != null) { document.close(); } } catch (IOException e) { throw new OkapiIOException("Could not close " + getDocumentName(), e); } this.document = null; // help Java GC LOGGER.debug("{} has been closed", getDocumentName()); }