public class ByteArrayRequestBodyWriter extends java.lang.Object implements RequestBodyWriter
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
content
The content.
|
protected int |
pos
The position within the content at which the next read will occur.
|
| Constructor and Description |
|---|
ByteArrayRequestBodyWriter(byte[] content)
Constructs a new byte array request body writer with the specified
content.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected byte[] content
protected int pos
public ByteArrayRequestBodyWriter(byte[] content)
content - the content bufferpublic int getContentLength()
getContentLength in interface RequestBodyWriterpublic void reset()
reset in interface RequestBodyWriterpublic int write(byte[] buffer)
write in interface RequestBodyWriterbuffer - the content buffer© Copyright 2003 The Free Software Foundation, all rights reserved