- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中java.util.prefs.XMLParser.exportNode()
方法的一些代码示例,展示了XMLParser.exportNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLParser.exportNode()
方法的具体详情如下:
包路径:java.util.prefs.XMLParser
类名称:XMLParser
方法名:exportNode
暂无
代码示例来源:origin: robovm/robovm
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: robovm/robovm
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: MobiVM/robovm
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: ibinti/bugvm
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: FlexoVM/flexovm
/***************************************************************************
* utilities for Preferences export
**************************************************************************/
static void exportPrefs(Preferences prefs, OutputStream stream,
boolean withSubTree) throws IOException, BackingStoreException {
indent = -1;
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8"));
out.write(HEADER);
out.newLine();
out.newLine();
out.write(DOCTYPE);
out.write(" '");
out.write(PREFS_DTD_NAME);
out.write("'>");
out.newLine();
out.newLine();
flushStartTag("preferences", new String[] { "EXTERNAL_XML_VERSION" },
new String[] { String.valueOf(XML_VERSION) }, out);
flushStartTag("root", new String[] { "type" },
new String[] { prefs.isUserNode() ? "user" : "system" }, out);
flushEmptyElement("map", out);
StringTokenizer ancestors = new StringTokenizer(prefs.absolutePath(), "/");
exportNode(ancestors, prefs, withSubTree, out);
flushEndTag("root", out);
flushEndTag("preferences", out);
out.flush();
out = null;
}
代码示例来源:origin: com.bugvm/bugvm-rt
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: ibinti/bugvm
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: MobiVM/robovm
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
代码示例来源:origin: FlexoVM/flexovm
private static void exportNode(StringTokenizer ancestors,
Preferences prefs, boolean withSubTree, BufferedWriter out)
throws IOException, BackingStoreException {
if (ancestors.hasMoreTokens()) {
String name = ancestors.nextToken();
flushStartTag("node", new String[] { "name" }, new String[] { name }, out);
if (ancestors.hasMoreTokens()) {
flushEmptyElement("map", out);
exportNode(ancestors, prefs, withSubTree, out);
} else {
exportEntries(prefs, out);
if (withSubTree) {
exportSubTree(prefs, out);
}
}
flushEndTag("node", out);
}
}
本文整理了Java中java.util.prefs.XMLParser.exportNode()方法的一些代码示例,展示了XMLParser.exportNode()的具体用法。这些代码示例主要来源于
我是一名优秀的程序员,十分优秀!