Class StringInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    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.
    • Constructor Detail

      • StringInputStream

        public StringInputStream​(String s)
    • 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.