com.global.api.utils.IOUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
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();
}
}