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

com.ats.executor.AtsCallscriptLogs Maven / Gradle / Ivy

The newest version!
package com.ats.executor;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;

public class AtsCallscriptLogs{

	private PrintStream systemOutput = null;

	private ByteArrayOutputStream baos = new ByteArrayOutputStream();
	private PrintStream ps = new PrintStream(baos);

	public AtsCallscriptLogs() {
		systemOutput = System.out;
		System.setOut(ps);
	}

	public String terminate() {

		String result = null;
		try {
			baos.flush();
			result = baos.toString();
		} catch (IOException e) {}

		System.setOut(systemOutput);

		if(result != null) {
			String[] logs = result.replace("\r", "").split("\n");
			for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy