You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2016/07/16 17:15:20 UTC

[jira] [Resolved] (SSHD-677) Provide a quick default implementation for executing a single simple command that does not require any input

     [ https://issues.apache.org/jira/browse/SSHD-677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Goldstein Lyor resolved SSHD-677.
---------------------------------
    Resolution: Fixed

> Provide a quick default implementation for executing a single simple command that does not require any input
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-677
>                 URL: https://issues.apache.org/jira/browse/SSHD-677
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 1.3.0
>            Reporter: Goldstein Lyor
>            Assignee: Goldstein Lyor
>              Labels: features
>             Fix For: 1.3.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> {code:java}
> default String executeCommand(String cmd) throws IOException {
>      ...invoke method below + throw IOException if anything written to stderr...
> }
> default String executeCommand(String cmd, Appendable stderr /* ignored if null */) throws IOException {
>     StringBuilder result = new StringBuilder(Byte.MAX_VALUE);
>     executeCommand(cmd, result, stderr);
>     return result.toString();
> }
> default void executeCommand(String cmd, Appendable stdout /* ignored if null */, Appendable stderr /* ignored if null */) throws IOException {
>     ....throw exception if any input is required...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)