com.sun.xml.internal.fastinfoset.vocab.SerializerVocabulary Java Examples

The following examples show how to use com.sun.xml.internal.fastinfoset.vocab.SerializerVocabulary. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FastInfosetCodec.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #2
Source File: FastInfosetCodec.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: FastInfosetCodec.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: FastInfosetCodec.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #5
Source File: FastInfosetCodec.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #6
Source File: FastInfosetCodec.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source File: FastInfosetCodec.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #8
Source File: FastInfosetCodec.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example #9
Source File: Encoder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #10
Source File: Encoder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #11
Source File: VocabularyGenerator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #12
Source File: VocabularyGenerator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #13
Source File: VocabularyGenerator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #14
Source File: Encoder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #15
Source File: VocabularyGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #16
Source File: VocabularyGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #17
Source File: VocabularyGenerator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #18
Source File: Encoder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #19
Source File: VocabularyGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #20
Source File: VocabularyGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #21
Source File: Encoder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #22
Source File: VocabularyGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #23
Source File: VocabularyGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #24
Source File: VocabularyGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #25
Source File: Encoder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #26
Source File: VocabularyGenerator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator() {
    _serializerVocabulary = new SerializerVocabulary();
    _parserVocabulary = new ParserVocabulary();

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #27
Source File: VocabularyGenerator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #28
Source File: Encoder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void setExternalVocabulary(ExternalVocabulary v) {
    // Create internal serializer vocabulary
    _v = new SerializerVocabulary();
    // Set the external vocabulary
    SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
            _useLocalNameAsKeyForQualifiedNameLookup);
    _v.setExternalVocabulary(v.URI,
            ev, false);

    _vIsInternal = true;
}
 
Example #29
Source File: VocabularyGenerator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}
 
Example #30
Source File: VocabularyGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a new instance of VocabularyGenerator */
public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
    _serializerVocabulary = serializerVocabulary;
    _parserVocabulary = parserVocabulary;

    _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
}