class Protocol::HTTP::Body::Head

Represents a body suitable for HEAD requests, in other words, a body that is empty and has a known length.

def self.for(body)

Create a head body for the given body, capturing its length and then closing it.
def self.for(body)
	head = self.new(body.length)
	
	body.close
	
	return head
end

def empty?

@returns [Boolean] the body is empty.
def empty?
	true
end

def initialize(length)

@parameter length [Integer] the length of the body.

Initialize the head body with the given length.
def initialize(length)
	@length = length
end

def length

@returns [Integer] the length of the body, if known.
def length
	@length
end

def ready?

@returns [Boolean] the body is ready.
def ready?
	true
end