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:
Closeable

public class StringInputStream
extends ByteArrayInputStream

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


Field Summary
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
StringInputStream(String s)
           
 
Method Summary
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringInputStream

public StringInputStream(String s)
                  throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getString

public 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 © 2016. All rights reserved.