T - Type to be written.public interface IJAXBVersatileWriter<T> extends IVersatileWriter<T>
IVersatileWriter based on
IJAXBWriter.| Modifier and Type | Method and Description |
|---|---|
default ByteBuffer |
getAsByteBuffer()
Write the passed object to a
ByteBuffer and return it (write). |
default byte[] |
getAsBytes()
Write the passed object to a byte array and return the created byte array
(write).
|
default Document |
getAsDocument()
Convert the passed object to a new DOM document (write).
|
default com.helger.commons.io.stream.NonBlockingByteArrayInputStream |
getAsInputStream()
Write the passed object to a byte array and return the input stream on that
array.
|
default com.helger.xml.microdom.IMicroDocument |
getAsMicroDocument()
Convert the passed object to a new micro document (write).
|
default com.helger.xml.microdom.IMicroElement |
getAsMicroElement()
Convert the passed object to a new micro document and return only the root
element (write).
|
default String |
getAsString()
Utility method to directly convert the passed domain object to an XML
string (write).
|
T |
getObjectToWrite() |
com.helger.jaxb.IJAXBWriter<T> |
getWriter() |
default com.helger.commons.state.ESuccess |
write(ByteBuffer aBuffer)
Write the passed object to a
ByteBuffer. |
default com.helger.commons.state.ESuccess |
write(ContentHandler aHandler)
Convert the passed object to XML.
|
default com.helger.commons.state.ESuccess |
write(File aResultFile)
Write the passed object to a
File. |
default com.helger.commons.state.ESuccess |
write(com.helger.jaxb.IJAXBWriter.IJAXBMarshaller<T> aMarshallerFunc)
Convert the passed object to XML.
|
default com.helger.commons.state.ESuccess |
write(com.helger.commons.io.resource.IWritableResource aResource)
Write the passed object to an
IWritableResource. |
default com.helger.commons.state.ESuccess |
write(OutputStream aOS)
Write the passed object to an
OutputStream. |
default com.helger.commons.state.ESuccess |
write(Path aResultPath)
Write the passed object to a
Path. |
default com.helger.commons.state.ESuccess |
write(Result aResult)
Convert the passed object to XML.
|
default com.helger.commons.state.ESuccess |
write(Writer aWriter)
Write the passed object to a
Writer. |
default com.helger.commons.state.ESuccess |
write(XMLStreamWriter aWriter)
Convert the passed object to XML.
|
@Nonnull com.helger.jaxb.IJAXBWriter<T> getWriter()
null.@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull File aResultFile)
File.write in interface IVersatileWriter<T>aResultFile - The result file to be written to. May not be null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull Path aResultPath)
Path.write in interface IVersatileWriter<T>aResultPath - The result path to be written to. May not be null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull @WillClose OutputStream aOS)
OutputStream.write in interface IVersatileWriter<T>aOS - The output stream to write to. Will always be closed. May not be
null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull @WillClose Writer aWriter)
Writer.write in interface IVersatileWriter<T>aWriter - The writer to write to. Will always be closed. May not be
null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull ByteBuffer aBuffer)
ByteBuffer.write in interface IVersatileWriter<T>aBuffer - The byte buffer to write to. If the buffer is too small, it is
automatically extended. May not be null.ESuccessBufferOverflowException - If the ByteBuffer is too small@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull com.helger.commons.io.resource.IWritableResource aResource)
IWritableResource.write in interface IVersatileWriter<T>aResource - The result resource to be written to. May not be null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull com.helger.jaxb.IJAXBWriter.IJAXBMarshaller<T> aMarshallerFunc)
write in interface IVersatileWriter<T>aMarshallerFunc - The marshalling function. May not be null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull Result aResult)
SafeXMLStreamWriter it is ensured that only valid XML is
created!write in interface IVersatileWriter<T>aResult - The result object holder. May not be null. Usually
SAXResult, DOMResult and StreamResult are supported.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull ContentHandler aHandler)
write in interface IVersatileWriter<T>aHandler - XML will be sent to this handler as SAX2 events. May not be
null.ESuccess@Nonnull default com.helger.commons.state.ESuccess write(@Nonnull @WillClose XMLStreamWriter aWriter)
write in interface IVersatileWriter<T>aWriter - XML will be sent to this writer. May not be null.ESuccess@Nullable default Document getAsDocument()
getAsDocument in interface IVersatileWriter<T>null if converting the document failed.@Nullable default com.helger.xml.microdom.IMicroDocument getAsMicroDocument()
getAsMicroDocument in interface IVersatileWriter<T>null if converting the document failed.@Nullable default com.helger.xml.microdom.IMicroElement getAsMicroElement()
getAsMicroElement in interface IVersatileWriter<T>null if converting the document failed.@Nullable default String getAsString()
getAsString in interface IVersatileWriter<T>null if the passed domain object could not be
converted because of validation errors.@Nullable default ByteBuffer getAsByteBuffer()
ByteBuffer and return it (write).getAsByteBuffer in interface IVersatileWriter<T>null if the passed domain object could not be
converted because of validation errors.@Nullable default byte[] getAsBytes()
getAsBytes in interface IVersatileWriter<T>null if the passed domain object could not be
converted because of validation errors.@Nullable default com.helger.commons.io.stream.NonBlockingByteArrayInputStream getAsInputStream()
getAsInputStream in interface IVersatileWriter<T>null if the passed domain object could not be
converted because of validation errors.Copyright © 2020 toop.eu. All rights reserved.