public class EmptyBodyReference extends Object implements Parser.BodyReference
Constructor and Description |
---|
EmptyBodyReference() |
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
Returns the HTTP body as a byte array.
|
long |
length() |
String |
text()
Returns the HTTP body as text.
|
void |
writeTo(OutputStream output)
Write the content to the given output stream.
|
public byte[] bytes() throws IOException
Parser.BodyReference
bytes
in interface Parser.BodyReference
IOException
- If reading fails.public String text() throws IOException
Parser.BodyReference
text
in interface Parser.BodyReference
IOException
- If reading fails.public long length()
length
in interface Parser.BodyReference
public void writeTo(OutputStream output) throws Exception
Parser.BodyReference
OutputStream
.writeTo
in interface Parser.BodyReference
output
- An output stream.Exception
- If write fails.Copyright © 2017. All rights reserved.