Example usage for io.netty.buffer ByteBuf writeZero

List of usage examples for io.netty.buffer ByteBuf writeZero

Introduction

In this page you can find the example usage for io.netty.buffer ByteBuf writeZero.

Prototype

public abstract ByteBuf writeZero(int length);

Source Link

Document

Fills this buffer with NUL (0x00) starting at the current writerIndex and increases the writerIndex by the specified length .

Usage

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetTpDstActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(/*w w  w.jav a 2 s. co m*/
            ((SetTpDstCase) action.getActionChoice()).getSetTpDstAction().getPort().getValue().intValue());
    outBuffer.writeZero(ActionConstants.PADDING_IN_TP_PORT_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetTpSrcActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(//from   w w w.j  av a2 s.  c o  m
            ((SetTpSrcCase) action.getActionChoice()).getSetTpSrcAction().getPort().getValue().intValue());
    outBuffer.writeZero(ActionConstants.PADDING_IN_TP_PORT_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetVlanPcpActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeByte(((SetVlanPcpCase) action.getActionChoice()).getSetVlanPcpAction().getVlanPcp());
    outBuffer.writeZero(ActionConstants.PADDING_IN_SET_VLAN_PCP_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10SetVlanVidActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(((SetVlanVidCase) action.getActionChoice()).getSetVlanVidAction().getVlanVid());
    outBuffer.writeZero(ActionConstants.PADDING_IN_SET_VLAN_VID_ACTION);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF10StripVlanActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeZero(ActionConstants.PADDING_IN_ACTION_HEADER);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF13OutputActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeInt(//  www .j a va  2s.  com
            ((OutputActionCase) action.getActionChoice()).getOutputAction().getPort().getValue().intValue());
    outBuffer.writeShort(((OutputActionCase) action.getActionChoice()).getOutputAction().getMaxLength());
    outBuffer.writeZero(ActionConstants.OUTPUT_PADDING);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF13PopMplsActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(((PopMplsCase) action.getActionChoice()).getPopMplsAction().getEthertype().getValue());
    outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF13PushMplsActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(/* w  w  w .  java  2s . c o m*/
            ((PushMplsCase) action.getActionChoice()).getPushMplsAction().getEthertype().getValue());
    outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF13PushPbbActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(((PushPbbCase) action.getActionChoice()).getPushPbbAction().getEthertype().getValue());
    outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}

From source file:org.opendaylight.openflowjava.protocol.impl.serialization.action.OF13PushVlanActionSerializer.java

License:Open Source License

@Override
public void serialize(Action action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    outBuffer.writeShort(//www.ja v a 2 s  .c om
            ((PushVlanCase) action.getActionChoice()).getPushVlanAction().getEthertype().getValue());
    outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}