static List<Header> createHeaders(int numHeaders, int nameLength, int valueLength, boolean limitToAscii) {
        List<Header> headers = new ArrayList<Header>(numHeaders);
        Random r = new Random();
        for (int i = 0; i < numHeaders; ++i) {
            byte[] name = randomBytes(new byte[nameLength], limitToAscii);
            byte[] value = randomBytes(new byte[valueLength], limitToAscii);
            headers.add(new Header(name, value));
        }
        return headers;
    }
static List<Header> createHeaders(int numHeaders, int nameLength, int valueLength, boolean limitToAscii) {
        List<Header> headers = new ArrayList<Header>(numHeaders);
        Random r = new Random();
        for (int i = 0; i < numHeaders; ++i) {
            byte[] name = randomBytes(new byte[nameLength], limitToAscii);
            byte[] value = randomBytes(new byte[valueLength], limitToAscii);
            headers.add(new Header(name, value));
        }
        return headers;
    }
static List < Header > createHeaders ( int numHeaders , int nameLength , int valueLength , boolean limitToAscii ) { List < Header > headers = new ArrayList < Header > ( numHeaders ) ; Random r = new Random ( ) ; for ( int i = 0 ; i < numHeaders ; ++ i ) { byte [ ] name = randomBytes ( new byte [ nameLength ] , limitToAscii ) ; byte [ ] value = randomBytes ( new byte [ valueLength ] , limitToAscii ) ; headers . add ( new Header ( name , value ) ) ; } return headers ; }
Creates a number of random headers with the given name/value lengths.
Creates a number of random headers with the given name / value lengths .