Cleanup framing mechanisms
[controller.git] / opendaylight / netconf / netconf-util / src / main / java / org / opendaylight / controller / netconf / util / handler / EOMFramingMechanismEncoder.java
index 7ec5a8f8dcd6c7304b8e7f5edbf7d292acb70199..383cebb04f680d2d7a352d1e18a6dcb8f81c3b90 100644 (file)
@@ -8,20 +8,16 @@
 
 package org.opendaylight.controller.netconf.util.handler;
 
-import org.opendaylight.controller.netconf.util.messages.NetconfMessageConstants;
-
 import io.netty.buffer.ByteBuf;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.MessageToByteEncoder;
 
-public class EOMFramingMechanismEncoder extends MessageToByteEncoder<ByteBuf> {
-
-    private byte[] eom = NetconfMessageConstants.endOfMessage;
+import org.opendaylight.controller.netconf.util.messages.NetconfMessageConstants;
 
+public class EOMFramingMechanismEncoder extends MessageToByteEncoder<ByteBuf> {
     @Override
     protected void encode(ChannelHandlerContext ctx, ByteBuf msg, ByteBuf out) throws Exception {
         out.writeBytes(msg);
-        out.writeBytes(eom);
+        out.writeBytes(NetconfMessageConstants.endOfMessage);
     }
-
 }