com.amazonaws.util
Class StringInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by com.amazonaws.util.StringInputStream
All Implemented Interfaces:
java.io.Closeable

public class StringInputStream
extends java.io.ByteArrayInputStream

Simple wrapper for ByteArrayInputStream that will automatically encode the string as UTF-8 data, and still allows access to the original string.


Constructor Summary
StringInputStream(java.lang.String s)
           
 
Method Summary
 java.lang.String getString()
          Returns the original string specified when this input stream was constructed.
 
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringInputStream

public StringInputStream(java.lang.String s)
                  throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException
Method Detail

getString

public java.lang.String getString()
Returns the original string specified when this input stream was constructed.

Returns:
The original string specified when this input stream was constructed.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.