@@ -25,76 +25,76 @@ private ShellUtils() {
2525 /**
2626 * Execute the command.
2727 *
28- * @param command The command.
29- * @param isRoot True to use root, false otherwise.
28+ * @param command The command.
29+ * @param isRooted True to use root, false otherwise.
3030 * @return the single {@link CommandResult} instance
3131 */
32- public static CommandResult execCmd (final String command , final boolean isRoot ) {
33- return execCmd (new String []{command }, isRoot , true );
32+ public static CommandResult execCmd (final String command , final boolean isRooted ) {
33+ return execCmd (new String []{command }, isRooted , true );
3434 }
3535
3636 /**
3737 * Execute the command.
3838 *
3939 * @param commands The commands.
40- * @param isRoot True to use root, false otherwise.
40+ * @param isRooted True to use root, false otherwise.
4141 * @return the single {@link CommandResult} instance
4242 */
43- public static CommandResult execCmd (final List <String > commands , final boolean isRoot ) {
44- return execCmd (commands == null ? null : commands .toArray (new String []{}), isRoot , true );
43+ public static CommandResult execCmd (final List <String > commands , final boolean isRooted ) {
44+ return execCmd (commands == null ? null : commands .toArray (new String []{}), isRooted , true );
4545 }
4646
4747 /**
4848 * Execute the command.
4949 *
5050 * @param commands The commands.
51- * @param isRoot True to use root, false otherwise.
51+ * @param isRooted True to use root, false otherwise.
5252 * @return the single {@link CommandResult} instance
5353 */
54- public static CommandResult execCmd (final String [] commands , final boolean isRoot ) {
55- return execCmd (commands , isRoot , true );
54+ public static CommandResult execCmd (final String [] commands , final boolean isRooted ) {
55+ return execCmd (commands , isRooted , true );
5656 }
5757
5858 /**
5959 * Execute the command.
6060 *
6161 * @param command The command.
62- * @param isRoot True to use root, false otherwise.
62+ * @param isRooted True to use root, false otherwise.
6363 * @param isNeedResultMsg True to return the message of result, false otherwise.
6464 * @return the single {@link CommandResult} instance
6565 */
6666 public static CommandResult execCmd (final String command ,
67- final boolean isRoot ,
67+ final boolean isRooted ,
6868 final boolean isNeedResultMsg ) {
69- return execCmd (new String []{command }, isRoot , isNeedResultMsg );
69+ return execCmd (new String []{command }, isRooted , isNeedResultMsg );
7070 }
7171
7272 /**
7373 * Execute the command.
7474 *
7575 * @param commands The commands.
76- * @param isRoot True to use root, false otherwise.
76+ * @param isRooted True to use root, false otherwise.
7777 * @param isNeedResultMsg True to return the message of result, false otherwise.
7878 * @return the single {@link CommandResult} instance
7979 */
8080 public static CommandResult execCmd (final List <String > commands ,
81- final boolean isRoot ,
81+ final boolean isRooted ,
8282 final boolean isNeedResultMsg ) {
8383 return execCmd (commands == null ? null : commands .toArray (new String []{}),
84- isRoot ,
84+ isRooted ,
8585 isNeedResultMsg );
8686 }
8787
8888 /**
8989 * Execute the command.
9090 *
9191 * @param commands The commands.
92- * @param isRoot True to use root, false otherwise.
92+ * @param isRooted True to use root, false otherwise.
9393 * @param isNeedResultMsg True to return the message of result, false otherwise.
9494 * @return the single {@link CommandResult} instance
9595 */
9696 public static CommandResult execCmd (final String [] commands ,
97- final boolean isRoot ,
97+ final boolean isRooted ,
9898 final boolean isNeedResultMsg ) {
9999 int result = -1 ;
100100 if (commands == null || commands .length == 0 ) {
@@ -107,7 +107,7 @@ public static CommandResult execCmd(final String[] commands,
107107 StringBuilder errorMsg = null ;
108108 DataOutputStream os = null ;
109109 try {
110- process = Runtime .getRuntime ().exec (isRoot ? "su" : "sh" );
110+ process = Runtime .getRuntime ().exec (isRooted ? "su" : "sh" );
111111 os = new DataOutputStream (process .getOutputStream ());
112112 for (String command : commands ) {
113113 if (command == null ) continue ;
0 commit comments