The getTotalBytes method of the Request class returns an integer that represents the number of bytes that was requested by the client.
public int getTotalBytes();