com.colobu.fastjson.IOUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastjson-jaxrs-json-provider Show documentation
Show all versions of fastjson-jaxrs-json-provider Show documentation
a JAX-RS entity provider for https://github.com/alibaba/fastjson
The newest version!
package com.colobu.fastjson;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
public class IOUtils {
/**
* read a String from an InputStream object.
* @param in InputStream
* @return String
* @throws Exception
*/
public static String inputStreamToString(InputStream in) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(in));
StringBuffer buffer = new StringBuffer();
String line;
while ((line = br.readLine()) != null) {
buffer.append(line);
}
return buffer.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy