src/PingClient.java
private static byte[] generateRandMsg() {
        String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        Random random = new Random();
        byte[] msg = new byte[MESSAGE_LENGTH];
        for (int i = 0; i < MESSAGE_LENGTH; i++) {
            msg[i] = (byte) str.charAt(random.nextInt(str.length()));
        }
        return msg;
    }
/**
     * Generate a random packet data with length {@value MESSAGE_LENGTH} Bytes using common characters.
     * @return byte[] generated random data, length {@value MESSAGE_LENGTH} Bytes
     */
Generate a random packet data with length  MESSAGE_LENGTH Bytes using common characters.
@return byte[] generated random data, length  MESSAGE_LENGTH Bytes
Generate a random packet data with length MESSAGE_LENGTH Bytes using common characters . @return byte [] generated random data length MESSAGE_LENGTH Bytes
private static byte[] generateRandMsg() {
        String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        Random random = new Random();
        byte[] msg = new byte[MESSAGE_LENGTH];
        for (int i = 0; i < MESSAGE_LENGTH; i++) {
            msg[i] = (byte) str.charAt(random.nextInt(str.length()));
        }
        return msg;
    }
private static byte [ ] generateRandMsg ( ) { String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ; Random random = new Random ( ) ; byte [ ] msg = new byte [ MESSAGE_LENGTH ] ; for ( int i = 0 ; i < MESSAGE_LENGTH ; i ++ ) { msg [ i ] = ( byte ) str . charAt ( random . nextInt ( str . length ( ) ) ) ; } return msg ; }
Generate a random packet data with length {@value MESSAGE_LENGTH} Bytes using common characters.
Generate a random packet data with length { @value MESSAGE_LENGTH } Bytes using common characters .