Interface ElementWriter<T>

Type Parameters:
T - The type of the elements to write.
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 interface ElementWriter<T>
An ElementWriter specifies how to write an object to an OutputStream.
Since:
1.1
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(T el, OutputStream out)
    Writes the specified element to the OutputStream.
  • Method Details

    • write

      void write(T el, OutputStream out) throws IOException
      Writes the specified element to the OutputStream.
      Parameters:
      el - The element. The implementation decides if the element may be null.
      out - The output stream. Must not be null.
      Throws:
      IOException - If an I/O error occurs.