gnu.inet.http

Interface RequestBodyWriter

Known Implementing Classes:
ByteArrayRequestBodyWriter

public interface RequestBodyWriter

Callback interface for writing request body content.

Method Summary

int
getContentLength()
Returns the total number of bytes that will be written in a single pass by this writer.
void
reset()
Initialises the writer.
int
write(byte[] buffer)
Writes body content to the supplied buffer.

Method Details

getContentLength

public int getContentLength()
Returns the total number of bytes that will be written in a single pass by this writer.

reset

public void reset()
Initialises the writer. This will be called before each pass.

write

public int write(byte[] buffer)
Writes body content to the supplied buffer.
Parameters:
buffer - the content buffer
Returns:
the number of bytes written