Search in sources :

Example 1 with RepeatableInputStream

use of com.opentext.ia.sdk.support.io.RepeatableInputStream in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class SipFileValidator method assertValidXml.

protected Document assertValidXml(InputStream stream, String humanFriendlyDocumentType, String schema) throws IOException {
    RepeatableInputStream repetableStream = new RepeatableInputStream(stream);
    XmlUtil.validate(repetableStream.get(), owner.getClass().getResourceAsStream("/" + schema), humanFriendlyDocumentType);
    return XmlUtil.parse(repetableStream.get());
}
Also used : RepeatableInputStream(com.opentext.ia.sdk.support.io.RepeatableInputStream)

Example 2 with RepeatableInputStream

use of com.opentext.ia.sdk.support.io.RepeatableInputStream in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class XmlTestCase method assertValidXml.

protected Document assertValidXml(InputStream stream, String humanFriendlyDocumentType, String schema) throws IOException {
    RepeatableInputStream repetableStream = new RepeatableInputStream(stream);
    XmlUtil.validate(repetableStream.get(), getClass().getResourceAsStream("/" + schema), humanFriendlyDocumentType);
    return XmlUtil.parse(repetableStream.get());
}
Also used : RepeatableInputStream(com.opentext.ia.sdk.support.io.RepeatableInputStream)

Aggregations

RepeatableInputStream (com.opentext.ia.sdk.support.io.RepeatableInputStream)2