Package org.jclouds.io.payloads
Class StringPayload
- java.lang.Object
-
- org.jclouds.io.payloads.BasePayload<String>
-
- org.jclouds.io.payloads.StringPayload
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Payload
public class StringPayload extends BasePayload<String>
This implementation converts the String to a byte array using UTF-8 encoding. If you wish to use a different encoding, please useByteArrayPayload
.
-
-
Field Summary
-
Fields inherited from class org.jclouds.io.payloads.BasePayload
content, contentMetadata, written
-
-
Constructor Summary
Constructors Constructor Description StringPayload(String content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
openStream()
Creates a new InputStream object of the payload.-
Methods inherited from class org.jclouds.io.payloads.BasePayload
close, equals, getContentMetadata, getInput, getRawContent, hashCode, isRepeatable, isSensitive, release, setContentMetadata, setSensitive, toString
-
-
-
-
Constructor Detail
-
StringPayload
public StringPayload(String content)
-
-
Method Detail
-
openStream
public InputStream openStream()
Creates a new InputStream object of the payload.
-
-