- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.persistence.oxm.XMLMarshaller.getEncoding()
方法的一些代码示例,展示了XMLMarshaller.getEncoding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLMarshaller.getEncoding()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.XMLMarshaller
类名称:XMLMarshaller
方法名:getEncoding
[英]Get the encoding set on this XMLMarshaller If the encoding has not been set the default UTF-8 will be used
[中]获取此XMLMarshaller上的编码集如果尚未设置编码,将使用默认的UTF-8
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
/**
* Saves the DataObject as an XML document with the specified root element.
* Same as
* save(createDocument(dataObject, rootElementURI, rootElementName),
* outputStream, null);
*
* @param dataObject specifies DataObject to be saved
* @param rootElementURI the Target Namespace URI of the root XML element
* @param rootElementName the Name of the root XML element
* @param outputStream specifies the OutputStream to write to.
* @throws IOException for stream exceptions.
* @throws IllegalArgumentException if the dataObject tree
* is not closed or has no container.
*/
public void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws XMLMarshalException, IOException {
XMLMarshaller xmlMarshaller = getXmlMarshaller(null);
OutputStreamWriter writer = new OutputStreamWriter(outputStream, xmlMarshaller.getEncoding());
save(dataObject, rootElementURI, rootElementName, writer, xmlMarshaller);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Saves the DataObject as an XML document with the specified root element.
* Same as
* save(createDocument(dataObject, rootElementURI, rootElementName),
* outputStream, null);
*
* @param dataObject specifies DataObject to be saved
* @param rootElementURI the Target Namespace URI of the root XML element
* @param rootElementName the Name of the root XML element
* @param outputStream specifies the OutputStream to write to.
* @throws IOException for stream exceptions.
* @throws IllegalArgumentException if the dataObject tree
* is not closed or has no container.
*/
public void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws XMLMarshalException, IOException {
XMLMarshaller xmlMarshaller = getXmlMarshaller(null);
OutputStreamWriter writer = new OutputStreamWriter(outputStream, xmlMarshaller.getEncoding());
save(dataObject, rootElementURI, rootElementName, writer, xmlMarshaller);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public void serialize(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
XMLMarshaller xmlMarshaller = getXmlMarshaller();
XMLAttachmentMarshaller attachmentMarshaller = xmlMarshaller.getAttachmentMarshaller();
//temporarily null out the attachment marshaller as it should not be used during serialization
xmlMarshaller.setAttachmentMarshaller(null);
OutputStreamWriter writer = new OutputStreamWriter(outputStream, xmlMarshaller.getEncoding());
save(xmlDocument, writer, xmlMarshaller);
xmlMarshaller.setAttachmentMarshaller(attachmentMarshaller);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
public void serialize(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
XMLMarshaller xmlMarshaller = getXmlMarshaller();
XMLAttachmentMarshaller attachmentMarshaller = xmlMarshaller.getAttachmentMarshaller();
//temporarily null out the attachment marshaller as it should not be used during serialization
xmlMarshaller.setAttachmentMarshaller(null);
OutputStreamWriter writer = new OutputStreamWriter(outputStream, xmlMarshaller.getEncoding());
save(xmlDocument, writer, xmlMarshaller);
xmlMarshaller.setAttachmentMarshaller(attachmentMarshaller);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.sdo
/**
* Serializes an XMLDocument as an XML document into the outputStream.
* If the DataObject's Type was defined by an XSD, the serialization
* will follow the XSD.
* Otherwise the serialization will follow the format as if an XSD
* were generated as defined by the SDO specification.
* The OutputStream will be flushed after writing.
* Does not perform validation to ensure compliance with an XSD.
* @param xmlDocument specifies XMLDocument to be saved
* @param outputStream specifies the OutputStream to write to.
* @param options implementation-specific options.
* @throws IOException for stream exceptions.
* @throws IllegalArgumentException if the dataObject tree
* is not closed or has no container.
*/
public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
if (xmlDocument == null) {
throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));
}
XMLMarshaller xmlMarshaller = getXmlMarshaller(options);
String encoding = xmlMarshaller.getEncoding();
if(xmlDocument.getEncoding() != null) {
encoding = xmlDocument.getEncoding();
}
OutputStreamWriter writer = new OutputStreamWriter(outputStream, encoding);
save(xmlDocument, writer, xmlMarshaller);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public Object getProperty(String propName) throws PropertyException {
if (null == propName) {
throw new IllegalArgumentException();
}
if (propName.equals(Marshaller.JAXB_ENCODING)) {
return this.xmlBinder.getMarshaller().getEncoding();
}
if (propName.equals(Marshaller.JAXB_FORMATTED_OUTPUT)) {
return this.xmlBinder.getMarshaller().isFormattedOutput();
}
if (propName.equals(Marshaller.JAXB_FRAGMENT)) {
return this.xmlBinder.getMarshaller().isFragment();
}
if (propName.equals(Marshaller.JAXB_SCHEMA_LOCATION)) {
return this.xmlBinder.getMarshaller().getSchemaLocation();
}
if (propName.equals(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION)) {
return this.xmlBinder.getMarshaller().getNoNamespaceSchemaLocation();
}
throw new PropertyException(propName);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy
@Override
public Object getProperty(String propName) throws PropertyException {
if (null == propName) {
throw new IllegalArgumentException();
}
if (propName.equals(Marshaller.JAXB_ENCODING)) {
return this.xmlBinder.getMarshaller().getEncoding();
}
if (propName.equals(Marshaller.JAXB_FORMATTED_OUTPUT)) {
return this.xmlBinder.getMarshaller().isFormattedOutput();
}
if (propName.equals(Marshaller.JAXB_FRAGMENT)) {
return this.xmlBinder.getMarshaller().isFragment();
}
if (propName.equals(Marshaller.JAXB_SCHEMA_LOCATION)) {
return this.xmlBinder.getMarshaller().getSchemaLocation();
}
if (propName.equals(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION)) {
return this.xmlBinder.getMarshaller().getNoNamespaceSchemaLocation();
}
throw new PropertyException(propName);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Serializes an XMLDocument as an XML document into the outputStream.
* If the DataObject's Type was defined by an XSD, the serialization
* will follow the XSD.
* Otherwise the serialization will follow the format as if an XSD
* were generated as defined by the SDO specification.
* The OutputStream will be flushed after writing.
* Does not perform validation to ensure compliance with an XSD.
* @param xmlDocument specifies XMLDocument to be saved
* @param outputStream specifies the OutputStream to write to.
* @param options implementation-specific options.
* @throws IOException for stream exceptions.
* @throws IllegalArgumentException if the dataObject tree
* is not closed or has no container.
*/
public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
if (xmlDocument == null) {
throw new IllegalArgumentException(SDOException.cannotPerformOperationWithNullInputParameter("save", "xmlDocument"));
}
XMLMarshaller xmlMarshaller = getXmlMarshaller(options);
String encoding = xmlMarshaller.getEncoding();
if(xmlDocument.getEncoding() != null) {
encoding = xmlDocument.getEncoding();
}
OutputStreamWriter writer = new OutputStreamWriter(outputStream, encoding);
save(xmlDocument, writer, xmlMarshaller);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy
return xmlMarshaller.isFormattedOutput();
} else if (JAXB_ENCODING.equals(key)) {
return xmlMarshaller.getEncoding();
} else if (JAXB_SCHEMA_LOCATION.equals(key)) {
return xmlMarshaller.getSchemaLocation();
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
return xmlMarshaller.isFormattedOutput();
} else if (JAXB_ENCODING.equals(key)) {
return xmlMarshaller.getEncoding();
} else if (JAXB_SCHEMA_LOCATION.equals(key)) {
return xmlMarshaller.getSchemaLocation();
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
boolean isXMLRoot = false;
String version = DEFAULT_XML_VERSION;
String encoding = getEncoding();
if (object instanceof XMLRoot) {
isXMLRoot = true;
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
String encoding = getEncoding();
if (object instanceof XMLRoot) {
isXMLRoot = true;
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
String encoding = getEncoding();
String version = DEFAULT_XML_VERSION;
if (!isXMLRoot) {
我有一个基于 C# 表单的程序并且一直在使用 System.Text.Encoding.GetEncoding(1252) 但我发现我在阅读非英文字符时遇到了困难 System.Text.Encodi
是否返回 DER encoded数据,还是其他格式? Javadoc我已经找到了一些细节方面有待改进的地方...... 最佳答案 至少对于 v1.52, org.bouncycastle.pkcs.P
我有一个使用 PBE 生成 key 的函数,我在网上搜索并找到了以下代码。 class PBE{ public PBE(String pw) { this.password =
我想从 OpenSSL 获得与 Java PublicKey.getEncoded() 相同的 ASN.1 输出。我使用 EC,曲线类型是 prime256v1。这是我的 OpenSSL 代码: EC
本文整理了Java中org.bouncycastle.cert.X509CRLHolder.getEncoded()方法的一些代码示例,展示了X509CRLHolder.getEncoded()的具体
我有以下测试程序 char c = '§'; Debug.WriteLine("c: " + (int)c); byte b = Encoding.GetEncoding(437).GetBytes(
public KeyPair generateKeyPair(@NonNull Context context, @NonNull String alias) { Calendar start
我需要为本地字符编码一些文本文件。 在我的 Windows 8.1 商店应用程序中,我可以正常使用 Encoding.GetEncoding() 方法: Encoding.GetEncoding("w
我有以下测试程序 char c = '§'; Debug.WriteLine("c: " + (int)c); byte b = Encoding.GetEncoding(437).GetBytes(
本文整理了Java中org.eclipse.persistence.oxm.XMLRoot.getEncoding()方法的一些代码示例,展示了XMLRoot.getEncoding()的具体用法。这
本文整理了Java中org.eclipse.persistence.oxm.XMLMarshaller.getEncoding()方法的一些代码示例,展示了XMLMarshaller.getEncod
我有一个函数可以使用指定的编码将字节数组解码为字符串。 例子: Function Decode(ByVal bytes() As Byte, ByVal codePage As String) As
我正在寻找与 Delphi7 中使用的 .Net Encoding.GetEncoding 方法等效的 Win32。 我想要实现的是将代码页 ID(即:28592)转换为代码页名称(在本例中为 iso
我希望在以下 python session 中 getencoding 的输出是“ISO-8859-1”: >>> import urllib2 >>> response = urllib2.urlo
如何使用 OpenSSL 在 C 语言中获得与 getEncoded() 方法产生的结果相同的结果?它是 Diffie-Hellman key 协议(protocol)所必需的,我必须将我的公钥发送到
我使用以下代码生成 AES key : KeyGenParameterSpec.Builder builder = new KeyGenParameterSpec.Builder("db_enc_ke
本文整理了Java中org.teiid.query.sql.symbol.XMLSerialize.getEncoding()方法的一些代码示例,展示了XMLSerialize.getEncoding
据我了解documentation应该可以通过服务“Windows-MY”访问Microsoft Windows KeyStore。 当我从 keyStore 加载 PrivateKey 时,我得到
我正在试验 key 派生函数,我注意到我通过所有 PBE 算法生成的 key 编码为纯文本密码。 我的意思是: public class Main { public static void m
我想从 COM6 获取设备的代码,我可以使用下面的代码轻松地从 C# 获取输出: serialPort1.Encoding = System.Text.Encoding.GetEncoding(285
我是一名优秀的程序员,十分优秀!