Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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();
    }
}