Class StringProvider

  • All Implemented Interfaces:
    Provider

    public class StringProvider
    extends java.lang.Object
    implements Provider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int _position  
      (package private) int _size  
      (package private) java.lang.String _string  
    • Constructor Summary

      Constructors 
      Constructor Description
      StringProvider​(java.lang.String string)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the stream and releases any system resources associated with it.
      int read​(char[] cbuf, int off, int len)
      Reads characters into an array
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _string

        java.lang.String _string
      • _position

        int _position
      • _size

        int _size
    • Constructor Detail

      • StringProvider

        public StringProvider​(java.lang.String string)
    • Method Detail

      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Description copied from interface: Provider
        Reads characters into an array
        Specified by:
        read in interface Provider
        Parameters:
        cbuf - Destination buffer
        off - Offset at which to start storing characters
        Returns:
        The number of characters read, or -1 if all read
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: Provider
        Closes the stream and releases any system resources associated with it.
        Specified by:
        close in interface Provider
        Throws:
        java.io.IOException