|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgnu.inet.http.ByteArrayRequestBodyWriter
public class ByteArrayRequestBodyWriter
A simple request body writer using a byte array.
| Field Summary | |
|---|---|
protected byte[] |
content
The content. |
protected int |
pos
The position within the content at which the next read will occur. |
| Constructor Summary | |
|---|---|
ByteArrayRequestBodyWriter(byte[] content)
Constructs a new byte array request body writer with the specified 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] content
protected int pos
| Constructor Detail |
|---|
public ByteArrayRequestBodyWriter(byte[] content)
content - the content buffer| Method Detail |
|---|
public int getContentLength()
getContentLength in interface RequestBodyWriterpublic void reset()
reset in interface RequestBodyWriterpublic int write(byte[] buffer)
write in interface RequestBodyWriterbuffer - the content buffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||