org.apache.xml.serialize.OutputFormat.getEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(121)

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

OutputFormat.getEncoding介绍

[英]Returns the specified encoding. If no encoding was specified, the default is always "UTF-8".
[中]返回指定的编码。如果未指定编码,则默认值始终为“UTF-8”。

代码示例

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Returns the last printable character based on the selected
 * encoding. Control characters and non-printable characters
 * are always printed as character references.
 */
public char getLastPrintable()
{
  if ( getEncoding() != null &&
     ( getEncoding().equalsIgnoreCase( "ASCII" ) ) ) {
    return 0xFF;
  }
  return 0xFFFF;
}

代码示例来源:origin: org.geotools.xsd/gt-core

/**
 * Returns the Charset defining the character encoding scheme this Encoder
 * uses to encode XML content.
 * <p>
 * If not otherwise set through {@link #setEncoding(Charset)},
 * <code>UTF-8</code> is used.
 * </p>
 * 
 * @return the character set used for encoding
 */
public Charset getEncoding() {
  final String charsetName = outputFormat.getEncoding();
  final Charset charset = Charset.forName(charsetName);
  return charset;
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

/**
 * Returns the Charset defining the character encoding scheme this Encoder
 * uses to encode XML content.
 * <p>
 * If not otherwise set through {@link #setEncoding(Charset)},
 * <code>UTF-8</code> is used.
 * </p>
 * 
 * @return the character set used for encoding
 */
public Charset getEncoding() {
  final String charsetName = outputFormat.getEncoding();
  final Charset charset = Charset.forName(charsetName);
  return charset;
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

private void copySettings(XMLSerializer src, XMLSerializer dest) {
  dest.fDOMErrorHandler = fErrorHandler;
  dest._format.setEncoding(src._format.getEncoding());
  dest._format.setLineSeparator(src._format.getLineSeparator());
  dest.fDOMFilter = src.fDOMFilter;
}//copysettings

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync

buffer.append( "1.0" );
buffer.append( '"' );
String format_encoding =  _format.getEncoding();
if (format_encoding != null) {
  buffer.append( " encoding=\"" );

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

buffer.append( "1.0" );
buffer.append( '"' );
String format_encoding =  _format.getEncoding();
if (format_encoding != null) {
  buffer.append( " encoding=\"" );

相关文章