code: private static File writePartToFile(File splitDir, List<String> data) {
          BufferedWriter writer = null;
          File splitFile;
          try {
              splitFile = File.createTempFile("split-", ".part", splitDir);
              writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(splitFile.getAbsoluteFile(), false),
                      DataUtilDefaults.charSet));
              for(String item : data) {
                  writer.write(item + DataUtilDefaults.lineTerminator);
              }
              writer.flush();
              writer.close();
              writer = null;
          } catch (UnsupportedEncodingException e) {
              throw new DataUtilException(e);
          } catch (FileNotFoundException e) {
              throw new DataUtilException(e);
          } catch (IOException e) {
              throw new DataUtilException(e);
          } finally {
              if(writer != null) {
                  try {
                      writer.close();
                  } catch (IOException e) {
                      // Intentionally we're doing nothing here
                  }
              }
          }
          return splitFile;
      }
docs: This method writes a partial input file to a split file
  @param splitDir split file directory
  @param data data
  @return <code>File</code> new split file