Class InspectableFileCachedInputStream

    • Field Detail

      • DEFAULT_BUFFER_SIZE

        public static final int DEFAULT_BUFFER_SIZE
        The default buffer size (64KiB).
        See Also:
        Constant Field Values
      • buffer

        public final byte[] buffer
        The inspection buffer. The first inspectable bytes contain the first part of the input stream. The buffer is available for inspection, but users should not modify its content.
      • inspectable

        public int inspectable
        The number of valid bytes currently in buffer.
    • Constructor Detail

      • InspectableFileCachedInputStream

        public InspectableFileCachedInputStream​(int bufferSize,
                                                File overflowFile)
                                         throws IOException
        Creates a new instance with specified buffer size and overlow-file directory.
        Parameters:
        bufferSize - the buffer size, in bytes.
        overflowFile - the directory where the overflow file should be created, or null for the default temporary directory.
        Throws:
        IOException
      • InspectableFileCachedInputStream

        public InspectableFileCachedInputStream​(int bufferSize)
                                         throws IOException
        Creates a new instance with specified buffer size and default overflow-file directory.
        Parameters:
        bufferSize - the buffer size, in bytes.
        Throws:
        IOException
      • InspectableFileCachedInputStream

        public InspectableFileCachedInputStream()
                                         throws IOException
        Creates a new instance with default buffer size and overflow-file directory.
        Throws:
        IOException