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

io.gem.api.SshResponse Maven / Gradle / Ivy

There is a newer version: 5.3
Show newest version
/**
 * Copyright (c) KMG. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 */

package io.gem.api;


import java.io.ByteArrayOutputStream;
import java.io.OutputStream;

/**
 * Class SshResponseStream.
 */
public final class SshResponse {
    /**
     * OutputStream errOutputStream.
     */
    public final OutputStream errOutputStream;
    /**
     * OutputStream stdOutputStream.
     */
    public final OutputStream stdOutputStream;
    /**
     * int returnCode.
     */
    public int returnCode;


    /**
     * This constructor is responsible for initializing all values.
     *
     * @param stdout boolean
     */
    public SshResponse(boolean stdout) {
        this.returnCode = 0;
        this.errOutputStream = new ByteArrayOutputStream();
        if (stdout) {
            this.stdOutputStream = new ByteArrayOutputStream();
        } else {
            this.stdOutputStream = OutputStream.nullOutputStream();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy