Class MCRHeaderInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class MCRHeaderInputStream extends MCRBlockingInputStream
Provides the header of the stream that is read. This may be useful for content type detection purposes. Immediately after stream construction, getHeader() can be called.
Author:
Frank Lützenkirchen
  • Field Details

    • MAX_HEADER_SIZE

      public static final int MAX_HEADER_SIZE
      The number of bytes that will be read for content type detection
      See Also:
  • Constructor Details

  • Method Details

    • getHeader

      public byte[] getHeader()
      Returns the header of the underlying input stream, at maximum MAX_HEADER_SIZE bytes.