@Override public void close() throws IOException { if (!finished) { finish(); } stream.close(); }
private void closeCurrentStream() throws IOException { currentWriter.flush(); WGLOG.info("I04002", resourceName, processName, currentPath, currentStream.getCount()); bytesCount += currentStream.getCount(); try { currentStream.close(); } catch (IOException e) { WGLOG.error(e, "E04002", resourceName, processName, currentPath); throw e; } currentPath = null; currentStream = null; currentWriter = null; }