arjuna.lib.utils.ResourceStreamBatteries Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arjuna-java Show documentation
Show all versions of arjuna-java Show documentation
Arjuna-Java is the client implementation in Java for development of test automation using Arjuna. It uses TestNG as the test engine. With minor tweaks, it can be used with any other test engine or custom test automation implementations. Arjuna is a Python based test automation framework developed by Rahul Verma (www.rahulverma.net)
The newest version!
package arjuna.lib.utils;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
public class ResourceStreamBatteries {
public static String streamToString(InputStream stream) throws Exception{
StringBuilder builder = new StringBuilder();
BufferedReader txtReader = new BufferedReader(new InputStreamReader(stream));
String line = null;
while ((line = txtReader.readLine()) != null) {
builder.append(line);
builder.append(System.getProperty("line.separator"));
}
txtReader.close();
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy