Class StringProvider

java.lang.Object
org.drools.mvel.parser.StringProvider
All Implemented Interfaces:
Closeable, AutoCloseable, Provider

public class StringProvider extends Object implements Provider
  • Constructor Details

    • StringProvider

      public StringProvider(String string)
  • Method Details

    • read

      public int read(char[] aDest, int nOfs, int nLen) throws 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:
      IOException - if reading fails
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable