Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.net.Uri; import java.io.IOException; import java.io.OutputStream; public class Main { public static void writeTextToUri(Context context, Uri uri, String string) throws IOException { OutputStream outputStream = context.getContentResolver().openOutputStream(uri); outputStream.write(string.getBytes()); outputStream.close(); } }