Exemplo n.º 1
0
  public static void writeImage(byte[] data, String filename, String path) {

    deleteImage(filename, path);
    Log.d("Deleting Images: ", path + filename);
    if (data != null) {
      FileOutputStream fOut;
      try {
        fOut = new FileOutputStream(new File(path, filename), false);
        fOut.write(data);
        fOut.flush();
        fOut.close();
      } catch (final FileNotFoundException e) {

        e.printStackTrace();
      } catch (final IOException e) {

        e.printStackTrace();
      }
    }
  }