Package org.verapdf.parser
Class SignatureParser
- java.lang.Object
-
- org.verapdf.parser.BaseParser
-
- org.verapdf.parser.COSParser
-
- org.verapdf.parser.SignatureParser
-
public class SignatureParser extends COSParser
Class is extension of BaseParser for parsing of digital signature dictionaries. It calculates byte range of digital signature.- Author:
- Sergey Shemyakov
-
-
Field Summary
-
Fields inherited from class org.verapdf.parser.COSParser
flag, integers, keyOfCurrentObject, LINEARIZATION_DICTIONARY_LOOKUP_SIZE, objects
-
Fields inherited from class org.verapdf.parser.BaseParser
source
-
-
Constructor Summary
Constructors Constructor Description SignatureParser(SeekableInputStream stream, COSDocument document)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]
getByteRangeBySignatureOffset(long signatureOffset)
Calculates actual byte range of signature.int
getFloatingBytesNumberForLastByteRangeObtained()
boolean
isStreamEnd()
-
Methods inherited from class org.verapdf.parser.COSParser
getArray, getDictionary, getDocument, getName, getStream, nextObject
-
Methods inherited from class org.verapdf.parser.BaseParser
appendToToken, clearToken, closeInputStream, findKeyword, findKeyword, getLine, getLine, getLineBytes, getRandomAccess, getRawBytes, getToken, initializeToken, isCR, isDigit, isDigit, isEOL, isFF, isHexDigit, isLF, isNextByteEOL, nextLine, nextToken, readName, readNumber, readUntilDelimiter, skipExpectedCharacter, skipSingleEol, skipSingleSpace, skipSingleSpace, skipSpaces, skipSpaces
-
-
-
-
Constructor Detail
-
SignatureParser
public SignatureParser(SeekableInputStream stream, COSDocument document) throws IOException
Constructor.- Parameters:
stream
- The stream to read the data from.- Throws:
IOException
- If there is an error reading the input stream.
-
-
Method Detail
-
getByteRangeBySignatureOffset
public long[] getByteRangeBySignatureOffset(long signatureOffset) throws IOException
Calculates actual byte range of signature.- Returns:
- array of 4 longs, which is byte range array.
- Throws:
IOException
-
getFloatingBytesNumberForLastByteRangeObtained
public int getFloatingBytesNumberForLastByteRangeObtained()
-
isStreamEnd
public boolean isStreamEnd()
-
-