de.undercouch.bson4jackson.serializers
Class BsonUuidSerializer

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonSerializer<T>
      extended by de.undercouch.bson4jackson.serializers.BsonSerializer<java.util.UUID>
          extended by de.undercouch.bson4jackson.serializers.BsonUuidSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class BsonUuidSerializer
extends BsonSerializer<java.util.UUID>

Serializer for writing UUIDs as BSON binary fields with UUID subtype. Can only be used in conjunction with the BsonGenerator.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
 
Constructor Summary
BsonUuidSerializer()
           
 
Method Summary
 void serialize(java.util.UUID value, BsonGenerator bgen, com.fasterxml.jackson.databind.SerializerProvider provider)
          Serialize the given object using the given BsonGenerator
 
Methods inherited from class de.undercouch.bson4jackson.serializers.BsonSerializer
serialize
 
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isUnwrappingSerializer, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BsonUuidSerializer

public BsonUuidSerializer()
Method Detail

serialize

public void serialize(java.util.UUID value,
                      BsonGenerator bgen,
                      com.fasterxml.jackson.databind.SerializerProvider provider)
               throws java.io.IOException
Description copied from class: BsonSerializer
Serialize the given object using the given BsonGenerator

Specified by:
serialize in class BsonSerializer<java.util.UUID>
Parameters:
value - The object to serialize
bgen - The generator to serialize to
provider - The serialization provider
Throws:
java.io.IOException - If an error occurred writing to the stream
com.fasterxml.jackson.core.JsonProcessingException - If a JSON error occurred