Interface DataSource.ReaderOpener

  • Enclosing class:
    DataSource

    public static interface DataSource.ReaderOpener
    Interface for lazy-opening a characters stream one time.
    • Method Detail

      • openOnce

        Reader openOnce()
                 throws IOException
        Open the stream once.

        Beware that this interface is only intended for lazy opening a stream, i.e. to delay this opening (or not open the stream at all). It is not intended to open the stream several times. Some implementations may fail if an attempt to open a stream several times is made. This is particularly true for network-based streams.

        Returns:
        opened stream
        Throws:
        IOException - if stream cannot be opened