Java UTF8 dumpStringArray(Path outputFilePath, String[] stringArray)

Here you can find the source of dumpStringArray(Path outputFilePath, String[] stringArray)

Description

dump String Array

License

Mozilla Public License

Declaration

public static void dumpStringArray(Path outputFilePath, String[] stringArray) throws IOException 

Method Source Code

//package com.java2s;
/**//  w ww.  j  a  v  a  2s. c  o m
 * Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

import java.io.BufferedWriter;

import java.io.IOException;

import java.nio.charset.Charset;

import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void dumpStringArray(Path outputFilePath, String[] stringArray) throws IOException {
        try (BufferedWriter os = Files.newBufferedWriter(outputFilePath, Charset.forName("UTF-8"))) {
            for (int i = 0; i < stringArray.length; i++) {
                os.write(stringArray[i]);
                os.newLine();
            }

        }
    }
}

Related

  1. createTemporaryOutputFolder()
  2. decodePayloadFromUtf8(String utf8string)
  3. decodeUTF8(byte[] bytes)
  4. decodeUtf8(String url)
  5. decUTF8(String s)
  6. dumpUtf8ToFile(List records, String delimiter, File file)
  7. fromUTF8(byte[] ba)
  8. fromUTF8(byte[] bytes)
  9. fromUTF8(byte[] bytes)