Interface StreamProvider

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
InputStreamProvider, OutputStreamProvider, ZipStreamProvider
All Known Implementing Classes:
ConcurrentFileExtractor, FileExtractor, FileLocator, LibraryExtractor, LibraryLocator

public interface StreamProvider extends AutoCloseable
A generic interface providing the main entry for all stream providers for buffered IO operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Generates a unique hash key for this object using an MSB to LSB spreading algorithm.
    void
    initialize(int size)
    Initializes the buffered stream handler object.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • initialize

      void initialize(int size) throws Exception
      Initializes the buffered stream handler object.
      Parameters:
      size - the size of the buffered IO in bytes or zero for auto filesystem size
      Throws:
      Exception
    • getHashKey

      default int getHashKey()
      Generates a unique hash key for this object using an MSB to LSB spreading algorithm.
      Returns:
      an XoR operation of the MSBs (Most Significant Bits) with the LSBs (the Least Significant Bits) of the object hash code