1 package org.opendaylight.lispflowmapping.implementation.serializer.address;
3 import java.net.InetAddress;
4 import java.net.UnknownHostException;
5 import java.nio.ByteBuffer;
7 import org.opendaylight.lispflowmapping.type.lisp.address.LispAddress;
8 import org.opendaylight.lispflowmapping.type.lisp.address.LispIpv6Address;
11 public class LispIpv6AddressSerializer extends LispIPAddressSerializer{
14 private static final LispIpv6AddressSerializer INSTANCE = new LispIpv6AddressSerializer();
16 // Private constructor prevents instantiation from other classes
17 private LispIpv6AddressSerializer() {
20 public static LispIpv6AddressSerializer getInstance() {
25 public int getAddressSize(LispAddress lispAddress) {
30 protected LispIpv6Address deserializeData(ByteBuffer buffer) {
31 byte[] ipBuffer = new byte[16];
32 InetAddress address = null;
35 address = InetAddress.getByAddress(ipBuffer);
36 } catch (UnknownHostException e) {
37 // TODO Auto-generated catch block
40 return new LispIpv6Address(address);
43 private interface Length {