gpt4 book ai didi

org.restlet.ext.xml.XmlWriter.writeEsc()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 12:57:05 28 4
gpt4 key购买 nike

本文整理了Java中org.restlet.ext.xml.XmlWriter.writeEsc()方法的一些代码示例,展示了XmlWriter.writeEsc()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlWriter.writeEsc()方法的具体详情如下:
包路径:org.restlet.ext.xml.XmlWriter
类名称:XmlWriter
方法名:writeEsc

XmlWriter.writeEsc介绍

[英]Write an array of data characters with escaping.
[中]使用转义写入数据字符数组。

代码示例

代码示例来源:origin: org.restlet/org.restlet.ext.xml

/**
 * Write ignorable whitespace. Pass the event on down the filter chain for
 * further processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param length
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the whitespace, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#ignorableWhitespace
 */
@Override
public void ignorableWhitespace(char ch[], int start, int length)
    throws SAXException {
  writeEsc(ch, start, length, false);
  super.ignorableWhitespace(ch, start, length);
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

/**
 * Write ignorable whitespace. Pass the event on down the filter chain for
 * further processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param length
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the whitespace, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#ignorableWhitespace
 */
@Override
public void ignorableWhitespace(char ch[], int start, int length)
    throws SAXException {
  writeEsc(ch, start, length, false);
  super.ignorableWhitespace(ch, start, length);
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

/**
 * Write character data. Pass the event on down the filter chain for further
 * processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param len
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the characters, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#characters
 */
private void characters(boolean dataFormat, char ch[], int start, int len)
    throws SAXException {
  if (dataFormat) {
    this.state = SEEN_DATA;
  }
  writeEsc(ch, start, len, false);
  super.characters(ch, start, len);
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

/**
 * Write ignorable whitespace. Pass the event on down the filter chain for
 * further processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param length
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the whitespace, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#ignorableWhitespace
 */
@Override
public void ignorableWhitespace(char ch[], int start, int length)
    throws SAXException {
  writeEsc(ch, start, length, false);
  super.ignorableWhitespace(ch, start, length);
}

代码示例来源:origin: org.restlet/org.restlet.ext.xml

/**
 * Write character data. Pass the event on down the filter chain for further
 * processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param len
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the characters, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#characters
 */
private void characters(boolean dataFormat, char ch[], int start, int len)
    throws SAXException {
  if (dataFormat) {
    this.state = SEEN_DATA;
  }
  writeEsc(ch, start, len, false);
  super.characters(ch, start, len);
}

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

/**
 * Write character data. Pass the event on down the filter chain for further
 * processing.
 * 
 * @param ch
 *            The array of characters to write.
 * @param start
 *            The starting position in the array.
 * @param len
 *            The number of characters to write.
 * @exception org.xml.sax.SAXException
 *                If there is an error writing the characters, or if a
 *                restlet further down the filter chain raises an exception.
 * @see org.xml.sax.ContentHandler#characters
 */
private void characters(boolean dataFormat, char ch[], int start, int len)
    throws SAXException {
  if (dataFormat) {
    this.state = SEEN_DATA;
  }
  writeEsc(ch, start, len, false);
  super.characters(ch, start, len);
}

代码示例来源:origin: org.restlet/org.restlet.ext.xml

/**
 * Write out an attribute list, escaping values. The names will have
 * prefixes added to them.
 * 
 * @param atts
 *            The attribute list to write.
 * @exception org.xml.SAXException
 *                If there is an error writing the attribute list, this
 *                method will throw an IOException wrapped in a
 *                SAXException.
 */
private void writeAttributes(Attributes atts) throws SAXException {
  final int len = atts.getLength();
  for (int i = 0; i < len; i++) {
    final char ch[] = atts.getValue(i).toCharArray();
    write(' ');
    writeName(atts.getURI(i), atts.getLocalName(i), atts.getQName(i),
        false);
    write("=\"");
    writeEsc(ch, 0, ch.length, true);
    write('"');
  }
}

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

atts.getQName(i), false);
write("=\"");
writeEsc(ch, 0, ch.length, true);
write('"');

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

atts.getQName(i), false);
write("=\"");
writeEsc(ch, 0, ch.length, true);
write('"');

代码示例来源:origin: org.restlet.jee/org.restlet.ext.xml

write("=\"");
writeEsc(ch, 0, ch.length, true);
write('\"');

代码示例来源:origin: org.restlet/org.restlet.ext.xml

write("=\"");
writeEsc(ch, 0, ch.length, true);
write('\"');

代码示例来源:origin: org.restlet.android/org.restlet.ext.xml

write("=\"");
writeEsc(ch, 0, ch.length, true);
write('\"');

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com