Interface Contents.Supplier

All Superinterfaces:
AutoCloseable, Supplier<InputStream>
Enclosing class:
Contents

public static interface Contents.Supplier extends Supplier<InputStream>, AutoCloseable
A supplier that can be called multiple times, each invocation must return a new InputStream ready to read. The number of bytes that can be read from the InputStream must be identical to the number returned by the length method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Release the related resources, if any.
    int
     

    Methods inherited from interface java.util.function.Supplier

    get
  • Method Details

    • length

      int length()
      Returns:
      the number of bytes that can be read from the InputStream returned by calling the get method.
    • close

      void close() throws IOException
      Release the related resources, if any.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - on I/O failure