(byte[] request, int[] selectedIndex, String modifiedString)
| 51 | } |
| 52 | |
| 53 | public static byte[] do_modify_request(byte[] request, int[] selectedIndex, String modifiedString){ |
| 54 | byte[] modString = modifiedString.getBytes(); |
| 55 | byte[] newRequest = new byte[request.length + modifiedString.length() - (selectedIndex[1]-selectedIndex[0])]; |
| 56 | System.arraycopy(request, 0, newRequest, 0, selectedIndex[0]); |
| 57 | System.arraycopy(modString, 0, newRequest, selectedIndex[0], modString.length); |
| 58 | System.arraycopy(request, selectedIndex[1], newRequest, selectedIndex[0]+modString.length, request.length-selectedIndex[1]); |
| 59 | return newRequest; |
| 60 | } |
| 61 | |
| 62 | public static void show_message(String str1, String str2){ |
| 63 | JOptionPane.showMessageDialog(null, str1, str2, 0); |
no outgoing calls
no test coverage detected