Creating a new LZ4FrameInputStream instance already reads the underlying InputStream by calling nextFrameInfo().
This call should be deferred until an actual read(...) is performed i.e. separate instance creation and utilization.
Advantages
If input is never read or used no resources or handles would be allocated.
My use-case: underlying InputStream is not ready when creating LZ4FrameInputStream but actually is when used.
Creating a new
LZ4FrameInputStream
instance already reads the underlyingInputStream
by calling nextFrameInfo(). This call should be deferred until an actual read(...) is performed i.e. separate instance creation and utilization.Advantages
InputStream
is not ready when creating LZ4FrameInputStream but actually is when used.