Interface Provider

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    StreamProvider, StringProvider

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

      All Methods Instance Methods Abstract Methods 
      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 Detail

      • read

        int read​(char[] aDest,
                 int nOfs,
                 int nLen)
          throws java.io.IOException
        Reads characters into an array
        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