Subversion Repositories programming

Rev

Rev 190 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 190 Rev 191
Line 33... Line 33...
33
     * Method: generatePacket
33
     * Method: generatePacket
34
     * Purpose: This method will generate a String that is size bytes in
34
     * Purpose: This method will generate a String that is size bytes in
35
     * length. This is assumed to be size bytes when transferred across
35
     * length. This is assumed to be size bytes when transferred across
36
     * the network.
36
     * the network.
37
     */
37
     */
38
    private static Byte[] generatePacket (int size)
38
    private static byte[] generatePacket (int size)
39
    {
39
    {
40
        Byte packet[] = new Byte[size];
40
        byte packet[] = new byte[size];
41
        int i = 0;
41
        int i = 0;
42
 
42
 
43
        for (i=0; i<size; i++)
43
        for (i=0; i<size; i++)
44
            packet[i] = 10;
44
            packet[i] = 10;
45
 
45
 
Line 96... Line 96...
96
        {
96
        {
97
            System.err.printf ("Couldn't get I/O for the connection to: %s\n", hostName);
97
            System.err.printf ("Couldn't get I/O for the connection to: %s\n", hostName);
98
            System.exit(1);
98
            System.exit(1);
99
        }
99
        }
100
 
100
 
101
        Byte packet[] = generatePacket (packetSize);
101
        byte packet[] = generatePacket (packetSize);
102
        String response;
102
        String response;
103
        int i = 0;
103
        int i = 0;
104
 
104
 
105
        /* Start the timer */
105
        /* Start the timer */
106
        startTime = new Date();
106
        startTime = new Date();