public class JaxbCodec extends Object implements net.truelicense.api.codec.Codec
Marshaller/Unmarshaller derived from a JAXBContext.
This type of codec is used for V1/XML format license keys.
This class is immutable.| Modifier and Type | Field and Description |
|---|---|
protected JAXBContext |
context
The JAXB context provided to the constructor.
|
| Constructor and Description |
|---|
JaxbCodec(JAXBContext context) |
| Modifier and Type | Method and Description |
|---|---|
String |
contentTransferEncoding() |
String |
contentType() |
net.truelicense.api.codec.Decoder |
decoder(net.truelicense.api.io.Source source) |
net.truelicense.api.codec.Encoder |
encoder(net.truelicense.api.io.Sink sink) |
protected Marshaller |
marshaller()
Returns a new marshaller.
|
protected Unmarshaller |
unmarshaller()
Returns a new unmarshaller.
|
protected final JAXBContext context
public JaxbCodec(JAXBContext context)
public String contentTransferEncoding()
The implementation in the class JaxbCodec
returns "8bit".
contentTransferEncoding in interface net.truelicense.api.codec.Codecpublic String contentType()
The implementation in the class JaxbCodec
returns "application/xml; charset=utf-8".
contentType in interface net.truelicense.api.codec.Codecpublic net.truelicense.api.codec.Decoder decoder(net.truelicense.api.io.Source source)
decoder in interface net.truelicense.api.codec.Codecpublic net.truelicense.api.codec.Encoder encoder(net.truelicense.api.io.Sink sink)
encoder in interface net.truelicense.api.codec.Codecprotected Marshaller marshaller() throws JAXBException
JAXBExceptionprotected Unmarshaller unmarshaller() throws JAXBException
JAXBExceptionCopyright © 2005–2018 Schlichtherle IT Services. All rights reserved.