de.pdark.decentxml.Document.getEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(117)

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

Document.getEncoding介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.tycho/tycho-p2-facade

public static void write(TargetDefinitionFile target, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = target.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-metadata-model

public static void write(ProductConfiguration product, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = product.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: io.teecube.tic/tic-bw6

public static void write(TargetDefinitionFile target, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = target.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: eclipse/tycho

public static void write(Category category, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = category.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-metadata-model

public static void write(UpdateSite site, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = site.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-metadata-model

public static void write(Category category, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = category.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: eclipse/tycho

public static void write(ProductConfiguration product, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = product.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: eclipse/tycho

public static void write(UpdateSite site, File file) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = site.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-metadata-model

public static void write(Feature feature, File file, String indent) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = feature.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    xw.setIndent(indent);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: eclipse/tycho

public static void write(Feature feature, File file, String indent) throws IOException {
  OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  Document document = feature.document;
  try {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter(os, enc);
    XMLWriter xw = new XMLWriter(w);
    xw.setIndent(indent);
    try {
      document.toXML(xw);
    } finally {
      xw.flush();
    }
  } finally {
    IOUtil.close(os);
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-metadata-model

public static void write(IU iu, File file, String indent) throws IOException {
    OutputStream os = new BufferedOutputStream(new FileOutputStream(file));

    Document document = iu.document;
    try {
      String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
      Writer w = new OutputStreamWriter(os, enc);
      XMLWriter xw = new XMLWriter(w);
      xw.setIndent(indent);
      try {
        document.toXML(xw);
      } finally {
        xw.flush();
      }
    } finally {
      IOUtil.close(os);
    }
  }
}

代码示例来源:origin: org.sonatype.tycho/tycho-metadata-model

public static void write( Feature feature, File file )
  throws IOException
{
  OutputStream os = new BufferedOutputStream( new FileOutputStream( file ) );
  Document document = feature.document;
  try
  {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter( os, enc );
    XMLWriter xw = new XMLWriter( w );
    try
    {
      document.toXML( xw );
    }
    finally
    {
      xw.flush();
    }
  }
  finally
  {
    IOUtil.close( os );
  }
}

代码示例来源:origin: org.sonatype.tycho/tycho-metadata-model

public static void write( Target target, File file )
  throws IOException
{
  OutputStream os = new BufferedOutputStream( new FileOutputStream( file ) );
  Document document = target.document;
  try
  {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter( os, enc );
    XMLWriter xw = new XMLWriter( w );
    try
    {
      document.toXML( xw );
    }
    finally
    {
      xw.flush();
    }
  }
  finally
  {
    IOUtil.close( os );
  }
}

代码示例来源:origin: org.sonatype.tycho/tycho-metadata-model

public static void write( UpdateSite site, File file )
  throws IOException
{
  OutputStream os = new BufferedOutputStream( new FileOutputStream( file ) );
  Document document = site.document;
  try
  {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter( os, enc );
    XMLWriter xw = new XMLWriter( w );
    try
    {
      document.toXML( xw );
    }
    finally
    {
      xw.flush();
    }
  }
  finally
  {
    IOUtil.close( os );
  }
}

代码示例来源:origin: org.sonatype.tycho/tycho-metadata-model

public static void write( Category category, File file )
  throws IOException
{
  OutputStream os = new BufferedOutputStream( new FileOutputStream( file ) );
  Document document = category.document;
  try
  {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter( os, enc );
    XMLWriter xw = new XMLWriter( w );
    try
    {
      document.toXML( xw );
    }
    finally
    {
      xw.flush();
    }
  }
  finally
  {
    IOUtil.close( os );
  }
}

代码示例来源:origin: org.sonatype.tycho/tycho-metadata-model

public static void write( ProductConfiguration product, File file )
  throws IOException
{
  OutputStream os = new BufferedOutputStream( new FileOutputStream( file ) );
  Document document = product.document;
  try
  {
    String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
    Writer w = new OutputStreamWriter( os, enc );
    XMLWriter xw = new XMLWriter( w );
    try
    {
      document.toXML( xw );
    }
    finally
    {
      xw.flush();
    }
  }
  finally
  {
    IOUtil.close( os );
  }
}

代码示例来源:origin: eclipse/tycho

public static void write(IU iu, File file, String indent) throws IOException {
    OutputStream os = new BufferedOutputStream(new FileOutputStream(file));

    Document document = iu.document;
    try {
      String enc = document.getEncoding() != null ? document.getEncoding() : "UTF-8";
      Writer w = new OutputStreamWriter(os, enc);
      XMLWriter xw = new XMLWriter(w);
      xw.setIndent(indent);
      try {
        document.toXML(xw);
      } finally {
        xw.flush();
      }
    } finally {
      IOUtil.close(os);
    }
  }
}

相关文章