stAXDocumentSerializer.setMinAttributeValueSize(serializerMinAttributeValueSize.intValue());
stAXDocumentSerializer.setMinAttributeValueSize(serializerMinAttributeValueSize.intValue());
stAXDocumentSerializer.setMinAttributeValueSize(serializerMinAttributeValueSize.intValue());
stAXDocumentSerializer.setMinAttributeValueSize(serializerMinAttributeValueSize.intValue());
/** * Create a new (@link StAXDocumentSerializer} instance. * * @param in the OutputStream to serialize to. * @param retainState if true the serializer should retain the state of * vocabulary tables for multiple serializations. * @return a new {@link StAXDocumentSerializer} instance. */ /* package */ static StAXDocumentSerializer createNewStreamWriter(OutputStream out, boolean retainState, int indexedStringSizeLimit, int stringsMemoryLimit) { StAXDocumentSerializer serializer = new StAXDocumentSerializer(out); if (retainState) { /** * Create a serializer vocabulary external to the serializer. * This will ensure that the vocabulary will never be cleared * for each serialization and will be retained (and will grow) * for each serialization */ SerializerVocabulary vocabulary = new SerializerVocabulary(); serializer.setVocabulary(vocabulary); serializer.setMinAttributeValueSize(0); serializer.setMaxAttributeValueSize(indexedStringSizeLimit); serializer.setMinCharacterContentChunkSize(0); serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit); serializer.setAttributeValueMapMemoryLimit(stringsMemoryLimit); serializer.setCharacterContentChunkMapMemoryLimit(stringsMemoryLimit); } return serializer; }
/** * Create a new (@link StAXDocumentSerializer} instance. * * @param in the OutputStream to serialize to. * @param retainState if true the serializer should retain the state of * vocabulary tables for multiple serializations. * @return a new {@link StAXDocumentSerializer} instance. */ /* package */ static StAXDocumentSerializer createNewStreamWriter(OutputStream out, boolean retainState, int indexedStringSizeLimit, int stringsMemoryLimit) { StAXDocumentSerializer serializer = new StAXDocumentSerializer(out); if (retainState) { /** * Create a serializer vocabulary external to the serializer. * This will ensure that the vocabulary will never be cleared * for each serialization and will be retained (and will grow) * for each serialization */ SerializerVocabulary vocabulary = new SerializerVocabulary(); serializer.setVocabulary(vocabulary); serializer.setMinAttributeValueSize(0); serializer.setMaxAttributeValueSize(indexedStringSizeLimit); serializer.setMinCharacterContentChunkSize(0); serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit); serializer.setAttributeValueMapMemoryLimit(stringsMemoryLimit); serializer.setCharacterContentChunkMapMemoryLimit(stringsMemoryLimit); } return serializer; }
/** * Create a new (@link StAXDocumentSerializer} instance. * * @param in the OutputStream to serialize to. * @param retainState if true the serializer should retain the state of * vocabulary tables for multiple serializations. * @return a new {@link StAXDocumentSerializer} instance. */ /* package */ static StAXDocumentSerializer createNewStreamWriter(OutputStream out, boolean retainState, int indexedStringSizeLimit, int stringsMemoryLimit) { StAXDocumentSerializer serializer = new StAXDocumentSerializer(out); if (retainState) { /** * Create a serializer vocabulary external to the serializer. * This will ensure that the vocabulary will never be cleared * for each serialization and will be retained (and will grow) * for each serialization */ SerializerVocabulary vocabulary = new SerializerVocabulary(); serializer.setVocabulary(vocabulary); serializer.setMinAttributeValueSize(0); serializer.setMaxAttributeValueSize(indexedStringSizeLimit); serializer.setMinCharacterContentChunkSize(0); serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit); serializer.setAttributeValueMapMemoryLimit(stringsMemoryLimit); serializer.setCharacterContentChunkMapMemoryLimit(stringsMemoryLimit); } return serializer; }