Class RangeInputByteStream

  • All Implemented Interfaces:
    InputByteStream

    public class RangeInputByteStream
    extends InputByteStreamImpl
    This InputByteStreamImpl implementation is only for internal engineering use. It is used only by the digsig package to wrap the digestible slices of the pdf document. The resulting inputStream is used by the verifier interfaces.
    • Constructor Detail

      • RangeInputByteStream

        public RangeInputByteStream​(InputByteStream ibs,
                                    long[] ranges)
                             throws java.io.IOException
        Create a chainedIBS from the ranges of interest.
        Parameters:
        ibs -
        ranges -
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        close in interface InputByteStream
        Specified by:
        close in class InputByteStreamImpl
        Throws:
        java.io.IOException
      • getPosition

        public long getPosition()
                         throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        getPosition in interface InputByteStream
        Specified by:
        getPosition in class InputByteStreamImpl
        Returns:
        The current position.
        Throws:
        java.io.IOException
      • length

        public long length()
                    throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        length in interface InputByteStream
        Specified by:
        length in class InputByteStreamImpl
        Returns:
        Total number of bytes available in this InputByteStream.
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        read in interface InputByteStream
        Specified by:
        read in class InputByteStreamImpl
        Returns:
        The byte at the current position or -1 if at or beyond EOF.
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] bytes,
                        int position,
                        int length)
                 throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        read in interface InputByteStream
        Specified by:
        read in class InputByteStreamImpl
        Parameters:
        bytes - The destination array.
        position - The offset in the byte array to put the first byte read.
        length - The number of bytes to read.
        Throws:
        java.io.IOException
      • seek

        public InputByteStream seek​(long position)
                             throws java.io.IOException
        Only for internal engineering use. This api can change without notice.
        Specified by:
        seek in interface InputByteStream
        Specified by:
        seek in class InputByteStreamImpl
        Parameters:
        position - Where to set the current position.
        Returns:
        This object.
        Throws:
        java.io.IOException
      • slice

        public InputByteStream slice​(long begin,
                                     long length)
                              throws java.io.IOException
        calls slice on underlying ChainedInputByteStream and returns it. Only for internal engineering use. This api can change without notice.
        Specified by:
        slice in interface InputByteStream
        Specified by:
        slice in class InputByteStreamImpl
        Parameters:
        begin - Offset within the current InputByteStream to start the slice.
        length - The length of the slice.
        Returns:
        A slice of the original InputByteStream.
        Throws:
        java.io.IOException
      • getChainedIBS

        public com.adobe.internal.io.stream.ChainedInputByteStream getChainedIBS()
        Only for internal engineering use. This api can change without notice.
      • getRanges

        public long[] getRanges()
        Only for internal engineering use. This api can change without notice.