All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.global.api.utils.IOUtils Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.utils;

import java.io.*;
import java.nio.charset.Charset;

public class IOUtils {
    public static String readFully(InputStream stream) throws IOException {
        StringBuilder sb = new StringBuilder();
        Reader reader = new BufferedReader(new InputStreamReader(stream, Charset.forName("UTF-8")));
        int c;
        while((c = reader.read()) != -1)
            sb.append((char)c);
        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy