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 voidclose()Only for internal engineering use.com.adobe.internal.io.stream.ChainedInputByteStreamgetChainedIBS()Only for internal engineering use.longgetPosition()Only for internal engineering use.long[]getRanges()Only for internal engineering use.longlength()Only for internal engineering use.intread()Only for internal engineering use.intread(byte[] bytes, int position, int length)Only for internal engineering use.InputByteStreamseek(long position)Only for internal engineering use.InputByteStreamslice(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.IOExceptionOnly for internal engineering use. This api can change without notice.- Specified by:
closein interfaceInputByteStream- Specified by:
closein classInputByteStreamImpl- Throws:
java.io.IOException
-
getPosition
public long getPosition() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Specified by:
getPositionin interfaceInputByteStream- Specified by:
getPositionin classInputByteStreamImpl- Returns:
- The current position.
- Throws:
java.io.IOException
-
length
public long length() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Specified by:
lengthin interfaceInputByteStream- Specified by:
lengthin classInputByteStreamImpl- Returns:
- Total number of bytes available in this
InputByteStream. - Throws:
java.io.IOException
-
read
public int read() throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Specified by:
readin interfaceInputByteStream- Specified by:
readin classInputByteStreamImpl- Returns:
- The byte at the current position or
-1if at or beyond EOF. - Throws:
java.io.IOException
-
read
public int read(byte[] bytes, int position, int length) throws java.io.IOExceptionOnly for internal engineering use. This api can change without notice.- Specified by:
readin interfaceInputByteStream- Specified by:
readin 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:
seekin interfaceInputByteStream- Specified by:
seekin 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:
slicein interfaceInputByteStream- Specified by:
slicein classInputByteStreamImpl- Parameters:
begin- Offset within the currentInputByteStreamto 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.
-
-