org.jclouds.io.payloads
Class StringPayload

java.lang.Object
  extended by org.jclouds.io.payloads.BasePayload<String>
      extended by org.jclouds.io.payloads.StringPayload
All Implemented Interfaces:
com.google.common.io.InputSupplier<InputStream>, Closeable, Payload, WriteTo

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 use ByteArrayPayload.

Author:
Adrian Cole

Field Summary
 
Fields inherited from class org.jclouds.io.payloads.BasePayload
content, contentMetadata, written
 
Constructor Summary
StringPayload(String content)
           
 
Method Summary
 InputStream getInput()
          Creates a new InputStream object of the payload.
 
Methods inherited from class org.jclouds.io.payloads.BasePayload
close, equals, getContentMetadata, getRawContent, hashCode, isRepeatable, release, setContentMetadata, toString, writeTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringPayload

public StringPayload(String content)
Method Detail

getInput

public InputStream getInput()
Creates a new InputStream object of the payload.



Copyright © 2009-2012 jclouds. All Rights Reserved.