com.buck.common.codec
Class UUIDCoder

java.lang.Object
  extended by com.buck.common.codec.UUIDCoder

public class UUIDCoder
extends Object

Encodes and decodes UUID objects using a supplied codec.

Author:
Robert J. Buck

Constructor Summary
UUIDCoder(Codec codec)
          Constructs a codec to encode UUID object.
 
Method Summary
 byte[] encode(UUID uuid)
          Encodes a UUID using the specified codec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUIDCoder

public UUIDCoder(Codec codec)
Constructs a codec to encode UUID object.

Parameters:
codec - the base codec to use.
Method Detail

encode

public byte[] encode(UUID uuid)
Encodes a UUID using the specified codec.

Parameters:
uuid - the UUID to encode
Returns:
an encoded UUID


Copyright © 2013. All Rights Reserved.