Package com.adobe.internal.io.stream
Class RangeInputByteStream
- java.lang.Object
-
- com.adobe.internal.io.stream.InputByteStreamImpl
-
- com.adobe.internal.io.stream.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.
-
-
Field Summary
-
Fields inherited from interface com.adobe.internal.io.stream.InputByteStream
EOF
-
-
Constructor Summary
Constructors Constructor Description RangeInputByteStream(InputByteStream ibs, long[] ranges)
Create a chainedIBS from the ranges of interest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Only for internal engineering use.com.adobe.internal.io.stream.ChainedInputByteStream
getChainedIBS()
Only for internal engineering use.long
getPosition()
Only for internal engineering use.long[]
getRanges()
Only for internal engineering use.long
length()
Only for internal engineering use.int
read()
Only for internal engineering use.int
read(byte[] bytes, int position, int length)
Only for internal engineering use.InputByteStream
seek(long position)
Only for internal engineering use.InputByteStream
slice(long begin, long length)
calls slice on underlying ChainedInputByteStream and returns it.-
Methods inherited from class com.adobe.internal.io.stream.InputByteStreamImpl
bytesAvailable, eof, read, slice, toInputStream, toString, unget
-
-
-
-
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 interfaceInputByteStream
- Specified by:
close
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
getPosition
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
length
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
read
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
read
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
seek
in classInputByteStreamImpl
- 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 interfaceInputByteStream
- Specified by:
slice
in classInputByteStreamImpl
- Parameters:
begin
- Offset within the currentInputByteStream
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.
-
-