X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Fserialization%2Faction%2FOF10AbstractIpAddressActionSerializer.java;h=fd7c4b5f158cc4526dccf4544ba75e94a83e4981;hb=519a86d1ddcfb8f0fe264174e62e5424e1efba1f;hp=5006a26936ae8801aaf650f264355f238fd302d9;hpb=c4492ffff102a6bf4b4ecc8f10f4babd95303fcb;p=openflowjava.git diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractIpAddressActionSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractIpAddressActionSerializer.java index 5006a269..fd7c4b5f 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractIpAddressActionSerializer.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10AbstractIpAddressActionSerializer.java @@ -1,32 +1,32 @@ -/* - * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.openflowjava.protocol.impl.serialization.action; - -import io.netty.buffer.ByteBuf; - -import org.opendaylight.openflowjava.protocol.impl.util.ByteBufUtils; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action; - -/** - * @author michal.polkorab - * - */ -public abstract class OF10AbstractIpAddressActionSerializer extends AbstractActionSerializer { - - @Override - public void serialize(final Action action, final ByteBuf outBuffer) { - super.serialize(action, outBuffer); - Iterable addressGroups = ByteBufUtils.DOT_SPLITTER - .split(action.getAugmentation(IpAddressAction.class).getIpAddress().getValue()); - for (String group : addressGroups) { - outBuffer.writeByte(Short.parseShort(group)); - } - } -} +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.impl.serialization.action; + +import io.netty.buffer.ByteBuf; + +import org.opendaylight.openflowjava.util.ByteBufUtils; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.IpAddressAction; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action; + +/** + * @author michal.polkorab + * + */ +public abstract class OF10AbstractIpAddressActionSerializer extends AbstractActionSerializer { + + @Override + public void serialize(final Action action, final ByteBuf outBuffer) { + super.serialize(action, outBuffer); + Iterable addressGroups = ByteBufUtils.DOT_SPLITTER + .split(action.getAugmentation(IpAddressAction.class).getIpAddress().getValue()); + for (String group : addressGroups) { + outBuffer.writeByte(Short.parseShort(group)); + } + } +}