本文整理了Java中org.eclipse.persistence.exceptions.XMLMarshalException.marshalException()
方法的一些代码示例,展示了XMLMarshalException.marshalException()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLMarshalException.marshalException()
方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.XMLMarshalException
类名称:XMLMarshalException
方法名:marshalException
暂无
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public void defaultNamespaceDeclaration(String defaultNamespace){
try{
xmlStreamWriter.writeDefaultNamespace(defaultNamespace);
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public void namespaceDeclaration(String prefix, String namespaceURI){
try{
xmlStreamWriter.writeNamespace(prefix, namespaceURI);
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public void endElement(XPathFragment pathFragment, NamespaceResolver namespaceResolver) {
try {
xmlStreamWriter.writeEndElement();
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
*/
public void startDocument(String encoding, String version) {
try {
contentHandler.startDocument();
} catch (SAXException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
*/
public void endPrefixMapping(String prefix) {
try {
contentHandler.endPrefixMapping(prefix);
} catch (SAXException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
private void write(byte b) {
if(bufferIndex == BUFFER_SIZE) {
try {
outputStream.write(buffer, 0, BUFFER_SIZE);
bufferIndex = 0;
} catch(IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
buffer[bufferIndex++] = b;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
*/
public void startDocument(String encoding, String version) {
try {
contentHandler.startDocument();
} catch (SAXException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public void defaultNamespaceDeclaration(String defaultNamespace){
try{
xmlStreamWriter.writeDefaultNamespace(defaultNamespace);
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public void cdata(String value) {
try {
xmlStreamWriter.writeCData(value);
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
*/
public void endDocument() {
try {
outputStream.write(CR);
} catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
*/
public void startPrefixMapping(String prefix, String namespaceURI) {
try {
contentHandler.startPrefixMapping(prefix, namespaceURI);
} catch (SAXException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public void endDocument() {
try {
xmlStreamWriter.writeEndDocument();
xmlStreamWriter.flush();
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
@Override
public void flush() {
try {
writer.write(builder.toString());
builder.setLength(0);
writer.flush();
} catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public void element(XPathFragment frag) {
try {
xmlStreamWriter.writeStartElement(getNameForFragment(frag));
xmlStreamWriter.writeEndElement();
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public void element(XPathFragment frag) {
try {
xmlStreamWriter.writeStartElement(getNameForFragment(frag));
xmlStreamWriter.writeEndElement();
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public void comment(char[] ch, int start, int length) throws SAXException {
try {
if (isStartElementOpen) {
outputStream.write(CLOSE_ELEMENT);
isStartElementOpen = false;
}
writeComment(ch, start, length);
} catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
protected void writeCharacters(char[] chars, int start, int length) {
try {
characters(chars, start, length);
} catch (SAXException e) {
throw XMLMarshalException.marshalException(e);
}
}
// --------------- SATISFY CONTENTHANDLER INTERFACE --------------- //
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public void node(Node node, NamespaceResolver resolver) {
try {
if(node.getNodeType() == Node.DOCUMENT_NODE) {
node = ((Document)node).getDocumentElement();
}
getDomToXMLStreamWriter().writeToStream(node, this.xmlStreamWriter);
} catch(XMLStreamException e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public void characters(String value) {
try {
if(isStartElementOpen) {
openAndCloseStartElement();
isStartElementOpen = false;
}
XMLEvent charactersEvent = this.xmlEventFactory.createCharacters(value);
this.xmlEventWriter.add(charactersEvent);
} catch(Exception e) {
throw XMLMarshalException.marshalException(e);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public void endDocument() {
try {
if(isStartElementOpen) {
openAndCloseStartElement();
isStartElementOpen = false;
}
XMLEvent endDoc = this.xmlEventFactory.createEndDocument();
this.xmlEventWriter.add(endDoc);
} catch(Exception e) {
throw XMLMarshalException.marshalException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!