java text savesteemCreated with Sketch.

in java •  7 years ago 

// save text utf-8

public static boolean txtSave(String fnm, String text) {
    Writer out = null;
    try {
        out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fnm), "UTF-8"));
        out.write(text);
        return true;
    } catch (IOException e) {
        return false;
    } finally {
        closeQuietly(out);
    }
}
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!