Interface Provider

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
LineEndingProcessingProvider, StreamProvider, StringProvider, UnicodeEscapeProcessingProvider

public interface Provider extends Closeable
Abstract interface for reading from a stream. The buffering should be done internally.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    read​(char[] aDest, int nOfs, int nLen)
    Reads characters into an array

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • read

      int read(char[] aDest, int nOfs, int nLen) throws IOException
      Reads characters into an array
      Parameters:
      aDest - Destination buffer. May not be null.
      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 at the end of the stream
      Throws:
      IOException - if reading fails