コード例 #1
0
 @Override
 protected void close() throws IOException {
   super.close();
   writerA.close();
   if (writerB != null) writerB.close();
   writerA = null;
   writerB = null;
 }
コード例 #2
0
 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);
   }
 }