Java File Append Text appendToFile(float[] in, String filename)

Here you can find the source of appendToFile(float[] in, String filename)

Description

append To File

License

LGPL

Declaration

public static void appendToFile(float[] in, String filename) throws IOException 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Main {
    public static void appendToFile(float[] in, String filename) throws IOException {
        BufferedWriter outputWriter = null;
        outputWriter = new BufferedWriter(new FileWriter(filename));
        for (int i = 0; i < in.length; i++) {
            outputWriter.write(Float.toString(in[i]));
            outputWriter.newLine();//from ww w .  ja  v a  2s. co  m
        }
        outputWriter.flush();
        outputWriter.close();
    }
}

Related

  1. appendToFile(File file, String data)
  2. appendToFile(File tempFile, String str)
  3. appendToFile(final File file, final String contents)
  4. appendToFile(final String filePath, final String textToAppend)
  5. appendToFile(final String text, final String urlFile)
  6. appendToFile(IFile file, String output)
  7. appendToFile(List strList, File file)
  8. appendToFile(String baseFilename, String appendingFilename)
  9. appendToFile(String content, File file, String encoding)