private StAXDocumentParser getParser(InputStream in) { StAXDocumentParser parser = new StAXDocumentParser(in); parser.setStringInterning(true); parser.setForceStreamClose(true); parser.setInputStream(in); return parser; }
private StAXDocumentParser getParser(InputStream in) { StAXDocumentParser parser = new StAXDocumentParser(in); parser.setStringInterning(true); parser.setForceStreamClose(true); parser.setInputStream(in); return parser; }
private StAXDocumentParser getParser(InputStream in) { StAXDocumentParser parser = new StAXDocumentParser(in); parser.setStringInterning(true); parser.setForceStreamClose(true); parser.setInputStream(in); return parser; }
private StAXDocumentParser getParser(InputStream in) { StAXDocumentParser parser = new StAXDocumentParser(in); parser.setStringInterning(true); parser.setForceStreamClose(true); parser.setInputStream(in); return parser; }
/** * 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; }
/** * 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; }
/** * 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; }