output Data in array to PrintWriter - Android java.io

Android examples for java.io:PrintWriter

Description

output Data in array to PrintWriter

Demo Code

import java.io.PrintWriter;

import android.util.Log;

public class Main {

  public static void outputData(short[] data, PrintWriter writer) {
    for (int i = 0; i < data.length; i++) {
      writer.println(String.valueOf(data[i]));
    }/* w ww.ja  v  a 2 s .  c  o m*/
    if (writer.checkError()) {
      Log.w("", "Error writing sensor event data");
    }
  }

}

Related Tutorials