public class TmchXmlParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE |
static java.lang.String |
ENCODED_PART_BEGIN_SIGN |
static java.lang.String |
ENCODED_PART_END_SIGN |
Constructor and Description |
---|
TmchXmlParser() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decodeSignedMarkData(java.io.InputStream encodedSignedMarkData)
Decodes the provided base64-encoded input stream into a decoded XML SMD data
|
static byte[] |
extractBase64EncodedPartFromSmdFile(java.io.InputStream smdFileInputStream)
Extracts the base64 encoded part from the given SMD file input stream,
part that is between delimiters "-----BEGIN ENCODED SMD-----\n" and "-----END ENCODED SMD-----"
|
protected static org.w3c.dom.Document |
loadSmdXmlIntoDocument(java.io.InputStream decodedSignedMarkData) |
static SignedMarkData |
parseDecodedSignedMarkData(java.io.InputStream decodedSignedMarkData)
Parses the provided decoded XML SMD data and loads it into a SignedMarkData bean
|
static SignedMarkData |
parseEncodedSignedMarkData(java.io.InputStream decodedSignedMarkData)
Decodes and parses the provided base64-encoded input stream and loads it into a SignedMarkData bean
|
public static final java.lang.String ENCODED_PART_BEGIN_SIGN
public static final java.lang.String ENCODED_PART_END_SIGN
public static final int BUFFER_SIZE
public static byte[] extractBase64EncodedPartFromSmdFile(java.io.InputStream smdFileInputStream) throws java.io.IOException
smdFileInputStream
- Input stream to the SMD file to parsejava.io.IOException
- In case the input stream cannot be readpublic static byte[] decodeSignedMarkData(java.io.InputStream encodedSignedMarkData) throws org.apache.commons.codec.DecoderException, java.io.IOException
encodedSignedMarkData
- Input stream to the base64-encoded data to decodejava.io.IOException
- In case the input stream cannot be readorg.apache.commons.codec.DecoderException
- In case the stream cannot be decodedpublic static SignedMarkData parseEncodedSignedMarkData(java.io.InputStream decodedSignedMarkData) throws java.io.IOException, org.apache.commons.codec.DecoderException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
decodedSignedMarkData
- Input stream to the base64-encoded input stream data to decode and parsejava.io.IOException
- In case the input stream cannot be readjavax.xml.parsers.ParserConfigurationException
- In case an error occurs while parsingorg.xml.sax.SAXException
- In case an error occurs while parsingorg.apache.commons.codec.DecoderException
- In case the stream cannot be decodedpublic static SignedMarkData parseDecodedSignedMarkData(java.io.InputStream decodedSignedMarkData) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
decodedSignedMarkData
- Input stream to the decoded XML SMD data to parsejava.io.IOException
- In case the input stream cannot be readjavax.xml.parsers.ParserConfigurationException
- In case an error occurs while parsingorg.xml.sax.SAXException
- In case an error occurs while parsingprotected static org.w3c.dom.Document loadSmdXmlIntoDocument(java.io.InputStream decodedSignedMarkData) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException