Interface ResourceUtils.StreamReader<T>

Type Parameters:
T - The return type
Enclosing class:
ResourceUtils
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ResourceUtils.StreamReader<T>
Functional interface for reading from a stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    read(InputStream stream)
    Reads data from the given input stream and converts it into an instance of type T.
  • Method Details

    • read

      T read(InputStream stream) throws IOException
      Reads data from the given input stream and converts it into an instance of type T.
      Parameters:
      stream - The input stream to read data from
      Returns:
      An instance of type T created from the data read from the stream
      Throws:
      IOException - If an I/O error occurs while reading the stream