9097029885 / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

Read Command Output #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
          final StringBuilder s = new StringBuilder();
          Command command = new Command(0, "COMMAND") {
           @Override
          public void output(int id, String line) { 
          s.append(line);
          }

        @Override
        public void commandCompleted(int arg0, int arg1) {
            // TODO Auto-generated method stub

        }

        @Override
        public void commandOutput(int arg0, String arg1) {
        }

        @Override
        public void commandTerminated(int arg0, String arg1) {

        } 
          }; 
          try {
            RootTools.getShell(true).add(command);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (TimeoutException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (RootDeniedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
          RootTools.log(s.toString());

What is the expected output? What do you see instead?
Nothing, this is the problem, I want the command output but I don't see I don't 
see anything.

What version of the product are you using? On what operating system?
I think is RootTools 3.3

Please provide any additional information below.

Original issue reported on code.google.com by Rassagai...@gmail.com on 19 Oct 2013 at 10:05

GoogleCodeExporter commented 8 years ago
move s.append(line); inside commandOutput and change line to arg1

Original comment by bradleyr...@gmail.com on 22 Oct 2013 at 4:09

GoogleCodeExporter commented 8 years ago
I solved it by my self, but thanks, I did it like you are saying.

Original comment by Rassagai...@gmail.com on 22 Oct 2013 at 4:36

GoogleCodeExporter commented 8 years ago
Mmmmm... How can I close this Issue?? 

Original comment by Rassagai...@gmail.com on 22 Oct 2013 at 4:37

GoogleCodeExporter commented 8 years ago
Closed

Original comment by Stericso...@gmail.com on 28 Oct 2013 at 3:55