Class ObjectStreamUtils


  • public class ObjectStreamUtils
    extends Object
    • Constructor Detail

      • ObjectStreamUtils

        public ObjectStreamUtils()
    • Method Detail

      • createObjectStream

        public static <T> ObjectStream<T> createObjectStream​(Collection<T> collection)
        Creates an ObjectStream form a Collection.
        Type Parameters:
        T - The generic type of the elements in the collection.
        Parameters:
        collection - The elements to feed into the new ObjectStream.
        Returns:
        The ObjectStream over the collection elements
      • concatenateObjectStream

        public static <T> ObjectStream<T> concatenateObjectStream​(Collection<ObjectStream<T>> streams)
        Creates a single concatenated ObjectStream from multiple individual streams with the same type ObjectStreamUtils.
        Type Parameters:
        T - The generic type of the elements in the collection.
        Parameters:
        streams - The collection of streams to feed into the concatenated ObjectStream. Every element of the collection must not be null.
        Returns:
        The concatenated ObjectStream aggregating all elements in streams.
      • concatenateObjectStream

        @SafeVarargs
        public static <T> ObjectStream<T> concatenateObjectStream​(ObjectStream<T>... streams)
        Creates a single concatenated ObjectStream from multiple individual streams with the same type.
        Type Parameters:
        T - The generic type of the elements in the streams.
        Parameters:
        streams - One or more stream to feed into the concatenated ObjectStream. Every element of the collection must not be null.
        Returns:
        The concatenated ObjectStream aggregating all elements in streams.