Package net.loomchild.segment.util
Class Bind
java.lang.Object
net.loomchild.segment.util.Bind
Helper class for JAXB binding.
Responsible for marshalling and unmarshalling using given schema and context.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Writes given object to given writer validating it.void
Writes given object to a file with given name validating it.Retrieves object from given reader validation the input.Retrieves object from a file with given name validating the input.
-
Field Details
-
marshaller
-
unmarshaller
-
-
Constructor Details
-
Bind
Creates Bind.- Parameters:
context
- JAXB contextschema
- XML schema
-
-
Method Details
-
marshal
Writes given object to given writer validating it.- Parameters:
writer
-object
-
-
marshal
Writes given object to a file with given name validating it.- Parameters:
fileName
-object
-
-
unmarshal
Retrieves object from given reader validation the input.- Parameters:
reader
-- Returns:
- object
-
unmarshal
Retrieves object from a file with given name validating the input.- Parameters:
fileName
-- Returns:
- object
-