Payload.StringBufferOutputStream, Payload.StringPayload
Constructor and Description |
---|
StringPayload(String content) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all open streams, both input and output.
|
String |
getContent()
Returns the content as a string.
|
InputStream |
getInputStream()
Returns a reference to the
InputStream associated with this payload. |
OutputStream |
getOutputStream()
Returns a reference to the
OutputStream associated with this payload. |
void |
setContent(String content)
Sets the content of the payload.
|
public StringPayload(String content)
public String getContent()
Payload
getContent
in interface Payload
public void setContent(String content)
Payload
setContent
in interface Payload
content
- the payload contentpublic InputStream getInputStream()
Payload
InputStream
associated with this payload.
This input stream can be read from. Once data has been read (consumed),
it can not be read again.getInputStream
in interface Payload
public OutputStream getOutputStream()
Payload
OutputStream
associated with this payload.
This can be used to write data to the payload. It is the responsibility of the
caller to call close()
or flush()
on the output stream.getOutputStream
in interface Payload
public void close() throws IOException
Payload
close
in interface Payload
IOException
- if there is an error while closing the streamsCopyright © Jitterbit, Inc. Licensed under the Jitterbit Master Subscription Agreement.