| 1 | package EZvulhub; |
| 2 | |
| 3 | public class Main { |
| 4 | public static void main(String[] args) { |
| 5 | String command = "calc"; |
| 6 | generateCommond(command); |
| 7 | } |
| 8 | |
| 9 | private static void generateCommond(String command) { |
| 10 | System.out.println("m命令: " + command); |
| 11 | byte[] result = command.getBytes(); |
| 12 | System.out.print("命令转为字节数组表示: "); |
| 13 | System.out.print("new byte[]{"); |
| 14 | for (int i = 0; i < result.length; i++) { |
| 15 | if (i != result.length - 1) { |
| 16 | System.out.print(result[i] + ","); |
| 17 | } else { |
| 18 | System.out.print(result[i]); |
| 19 | } |
| 20 | } |
| 21 | System.out.print("}\n"); |
| 22 | } |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected