Class StringProvider

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Provider

    public class StringProvider
    extends java.lang.Object
    implements Provider
    • 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()  
      int read​(char[] aDest, int nOfs, int nLen)
      Reads characters into an array
      • Methods inherited from class java.lang.Object

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

      • StringProvider

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

      • read

        public int read​(char[] aDest,
                        int nOfs,
                        int nLen)
                 throws java.io.IOException
        Description copied from interface: Provider
        Reads characters into an array
        Specified by:
        read in interface Provider
        Parameters:
        aDest - Destination buffer
        nOfs - Offset at which to start storing characters. Must be ≥ 0.
        nLen - The maximum possible number of characters to read. Must be ≥ 0.
        Returns:
        The number of characters read, or -1 if all read
        Throws:
        java.io.IOException - if reading fails
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable