Class LazyInputStreamResource

java.lang.Object
org.springframework.core.io.AbstractResource
com.broadleafcommerce.dataimport.service.support.LazyInputStreamResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class LazyInputStreamResource extends org.springframework.core.io.AbstractResource
An alternative to InputStreamResource that only creates the InputStream when getInputStream() is invoked.

This is based on the suggestion outlined in this issue.

Author:
Samarth Dhruva (samarthd)
  • Constructor Details

  • Method Details

    • getDescription

      @NonNull public String getDescription()
    • getInputStream

      @NonNull public InputStream getInputStream() throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.springframework.core.io.AbstractResource
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.springframework.core.io.AbstractResource