@Override protected void close() throws IOException { super.close(); writerA.close(); if (writerB != null) writerB.close(); writerA = null; writerB = null; }
protected void init(int mode) throws IOException { super.init(); writerA = new BufferedWriter(new FileWriter(outputA)); if (mode == TWO_FILES) { if (outputB == null) outputB = outputA + "1"; writerB = new BufferedWriter(new FileWriter(outputB)); } if (mode == N_FILES) { if (outputFiles == null) outputFiles = new LinkedList<>(); else outputFiles.clear(); outputFiles.add(outputA); } }