@Override
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
case ENTITY_REFERENCE:
((EntityReference) xmlSecEvent).getDeclaration().getReplacementText().getChars(sourceStart, sourceStart + length, target, targetStart);
return length;
case DTD:
((DTD) xmlSecEvent).getDocumentTypeDeclaration().getChars(sourceStart, sourceStart + length, target, targetStart);
return length;
case COMMENT:
((Comment) xmlSecEvent).getText().getChars(sourceStart, sourceStart + length, target, targetStart);
return length;
case CDATA:
case SPACE:
case CHARACTERS:
xmlSecEvent.asCharacters().getData().getChars(sourceStart, sourceStart + length, target, targetStart);
return length;
default:
throw new IllegalStateException("Current state not TEXT");
}
}
XMLSecurityStreamReader.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:xmlsec-gost
作者:
评论列表
文章目录