Interface IHasInputStream

All Known Subinterfaces:
IHasByteArray, IHasInputStreamAndReader, IMemoryReadableResource, IReadableResource, IReadWriteResource, IWrappedReadableResource
All Known Implementing Classes:
AbstractMemoryReadableResource, AbstractWrappedReadableResource, ByteArrayInputStreamProvider, ByteArrayWrapper, ByteBufferInputStreamProvider, CharsetHelper.InputStreamAndCharset, ClassPathResource, FileSystemResource, GZIPReadableResource, HasInputStream, ReadableResourceByteArray, ReadableResourceInputStream, ReadableResourceString, StringInputStreamProvider, URLResource

public interface IHasInputStream
A callback interface to retrieve InputStream objects.
Author:
Philip Helger
  • Method Details

    • getInputStream

      @Nullable InputStream getInputStream()
      Get the input stream to read from the object. Each time this method is called, a new InputStream needs to be created.
      Returns:
      null if resolving failed.
    • getBufferedInputStream

      @Nullable default InputStream getBufferedInputStream()
      Get a buffered input stream to read from the object. Each time this method is called, a new InputStream needs to be created. Internally invokes getInputStream().
      Returns:
      null if resolving failed.
      Since:
      9.1.8
    • isReadMultiple

      boolean isReadMultiple()
      Check if the InputStream from getInputStream() and getBufferedInputStream() can be acquired more than once.
      Returns:
      true if the input stream can be acquired more than once, false if not.