当前位置: 首页>>代码示例>>Java>>正文


Java SerializationHandler类代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.serializer.SerializationHandler的典型用法代码示例。如果您正苦于以下问题:Java SerializationHandler类的具体用法?Java SerializationHandler怎么用?Java SerializationHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SerializationHandler类属于com.sun.org.apache.xml.internal.serializer包,在下文中一共展示了SerializationHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyTextNode

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Copy the String value of a Text node to a SerializationHandler
 */
protected final void copyTextNode(final int nodeID, SerializationHandler handler)
    throws SAXException
{
    if (nodeID != DTM.NULL) {
        int dataIndex = m_dataOrQName.elementAt(nodeID);
        if (dataIndex >= 0) {
            m_chars.sendSAXcharacters(handler,
                                      dataIndex >>> TEXT_LENGTH_BITS,
                                      dataIndex & TEXT_LENGTH_MAX);
        } else {
            m_chars.sendSAXcharacters(handler, m_data.elementAt(-dataIndex),
                                      m_data.elementAt(-dataIndex+1));
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:SAX2DTM2.java

示例2: DOM3TreeWalker

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Constructor.
 * @param   contentHandler serialHandler The implemention of the SerializationHandler interface
 */
DOM3TreeWalker(
    SerializationHandler serialHandler,
    DOMErrorHandler errHandler,
    LSSerializerFilter filter,
    String newLine) {
    fSerializer = serialHandler;
    //fErrorHandler = errHandler == null ? new DOMErrorHandlerImpl() : errHandler; // Should we be using the default?
    fErrorHandler = errHandler;
    fFilter = filter;
    fLexicalHandler = null;
    fNewLine = newLine;

    fNSBinder = new NamespaceSupport();
    fLocalNSBinder = new NamespaceSupport();

    fDOMConfigProperties = fSerializer.getOutputFormat();
    fSerializer.setDocumentLocator(fLocator);
    initProperties(fDOMConfigProperties);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:DOM3TreeWalker.java

示例3: shallowCopy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
    throws TransletException
{
    if (_enhancedDOM != null) {
        return _enhancedDOM.shallowCopy(node, handler);
    }
    else {
        return _dom.shallowCopy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:DOMAdapter.java

示例4: characters

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public void characters(final int textNode, SerializationHandler handler)
  throws TransletException
{
    if (_enhancedDOM != null) {
        _enhancedDOM.characters(textNode, handler);
    }
    else {
        _dom.characters(textNode, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:DOMAdapter.java

示例5: copy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public void copy(final int node, SerializationHandler handler)
    throws TransletException
{
    if (_dom != null) {
        _dom.copy(node, handler);
    }
    else {
        super.copy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:AdaptiveResultTreeImpl.java

示例6: shallowCopy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
    throws TransletException
{
    if (_dom != null) {
        return _dom.shallowCopy(node, handler);
    }
    else {
        return super.shallowCopy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:AdaptiveResultTreeImpl.java

示例7: characters

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Dispatch the character content of a node to an output handler.
 *
 * The escape setting should be taken care of when outputting to
 * a handler.
 */
public void characters(final int node, SerializationHandler handler)
    throws TransletException
{
    if (_dom != null) {
        _dom.characters(node, handler);
    }
    else {
        super.characters(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:AdaptiveResultTreeImpl.java

示例8: characters

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Copy the string value of a node directly to an output handler
 */
public void characters(final int node, SerializationHandler handler)
    throws TransletException
{
    if (node != DTM.NULL) {
        try {
            dispatchCharactersEvents(node, handler, false);
        } catch (SAXException e) {
            throw new TransletException(e);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:SAXImpl.java

示例9: copy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Copy a node-set to an output handler
 */
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
    throws TransletException
{
    int node;
    while ((node = nodes.next()) != DTM.NULL) {
        copy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SAXImpl.java

示例10: copyPI

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Copies a processing instruction node to an output handler
 */
private void copyPI(final int node, SerializationHandler handler)
    throws TransletException
{
    final String target = getNodeName(node);
    final String value = getStringValueX(node);

    try {
        handler.processingInstruction(target, value);
    } catch (Exception e) {
        throw new TransletException(e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:SAXImpl.java

示例11: copyElement

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
/**
 * Copy an Element node to a SerializationHandler.
 *
 * @param nodeID The node identity
 * @param exptype The expanded type of the Element node
 * @param handler The SerializationHandler
 * @return The qualified name of the Element node.
 */
protected final String copyElement(int nodeID, int exptype,
                           SerializationHandler handler)
    throws SAXException
{
    final ExtendedType extType = m_extendedTypes[exptype];
    String uri = extType.getNamespace();
    String name = extType.getLocalName();

    if (uri.length() == 0) {
        handler.startElement(name);
        return name;
    } else {
        int qnameIndex = m_dataOrQName.elementAt(nodeID);

        if (qnameIndex == 0) {
            handler.startElement(name);
            handler.namespaceAfterStartElement(EMPTY_STR, uri);
            return name;
        }

        if (qnameIndex < 0) {
            qnameIndex = -qnameIndex;
            qnameIndex = m_data.elementAt(qnameIndex);
        }

        String qName = m_valuesOrPrefixes.indexToString(qnameIndex);
        handler.startElement(qName);
        int prefixIndex = qName.indexOf(':');
        String prefix;
        if (prefixIndex > 0) {
            prefix = qName.substring(0, prefixIndex);
        } else {
            prefix = null;
        }
        handler.namespaceAfterStartElement(prefix, uri);
        return qName;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:47,代码来源:SAX2DTM2.java

示例12: copy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
        throws TransletException
{
    int node;
    while ((node = nodes.next()) != DTM.NULL) {
        _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].copy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:MultiDOM.java

示例13: shallowCopy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public String shallowCopy(final int node, SerializationHandler handler)
        throws TransletException
{
    if (node == DTM.NULL) {
        return "";
    }
    return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].shallowCopy(node, handler);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:MultiDOM.java

示例14: characters

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public void characters(final int textNode, SerializationHandler handler)
             throws TransletException
{
    if (textNode != DTM.NULL) {
        _adapters[textNode >>> DTMManager.IDENT_DTM_NODE_BITS].characters(textNode, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:MultiDOM.java

示例15: copy

import com.sun.org.apache.xml.internal.serializer.SerializationHandler; //导入依赖的package包/类
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
    throws TransletException
{
    int node;
    while ((node = nodes.next()) != DTM.NULL)
    {
        copy(node, handler);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:SimpleResultTreeImpl.java


注:本文中的com.sun.org.apache.xml.internal.serializer.SerializationHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。