本文整理汇总了Java中com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser.setStringInterning方法的典型用法代码示例。如果您正苦于以下问题:Java StAXDocumentParser.setStringInterning方法的具体用法?Java StAXDocumentParser.setStringInterning怎么用?Java StAXDocumentParser.setStringInterning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser
的用法示例。
在下文中一共展示了StAXDocumentParser.setStringInterning方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StAXDocumentParser
import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser; //导入方法依赖的package包/类
/**
* Create a new (@link StAXDocumentParser} instance.
*
* @param in the InputStream to parse from.
* @param retainState if true the parser should retain the state of
* vocabulary tables for multiple parses.
* @return a new {@link StAXDocumentParser} instance.
*/
/* package */ static StAXDocumentParser createNewStreamReader(InputStream in, boolean retainState) {
StAXDocumentParser parser = new StAXDocumentParser(in);
parser.setStringInterning(true);
if (retainState) {
/**
* Create a parser vocabulary external to the parser.
* This will ensure that the vocabulary will never be cleared
* for each parse and will be retained (and will grow)
* for each parse.
*/
ParserVocabulary vocabulary = new ParserVocabulary();
parser.setVocabulary(vocabulary);
}
return parser;
}
示例2: FastInfosetStreamReaderRecyclable
import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser; //导入方法依赖的package包/类
/**
* Create a new (@link StAXDocumentParser} recyclable instance.
*
* @param in the InputStream to parse from.
* @param retainState if true the parser should retain the state of
* vocabulary tables for multiple parses.
* @return a new recyclable {@link StAXDocumentParser} instance.
*/
/* package */ static StAXDocumentParser createNewStreamReaderRecyclable(InputStream in, boolean retainState) {
StAXDocumentParser parser = new FastInfosetStreamReaderRecyclable(in);
parser.setStringInterning(true);
parser.setForceStreamClose(true);
if (retainState) {
/**
* Create a parser vocabulary external to the parser.
* This will ensure that the vocabulary will never be cleared
* for each parse and will be retained (and will grow)
* for each parse.
*/
ParserVocabulary vocabulary = new ParserVocabulary();
parser.setVocabulary(vocabulary);
}
return parser;
}
示例3: FastInfosetConnector
import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser; //导入方法依赖的package包/类
public FastInfosetConnector(StAXDocumentParser fastInfosetStreamReader,
XmlVisitor visitor) {
super(visitor);
fastInfosetStreamReader.setStringInterning(true);
this.fastInfosetStreamReader = fastInfosetStreamReader;
}