Created
March 14, 2013 08:40
-
-
Save md-5/5159811 to your computer and use it in GitHub Desktop.
Byte array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.md_5.bungee.netty; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.channel.ChannelHandler; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.handler.codec.MessageToByteEncoder; | |
@ChannelHandler.Sharable | |
public class ByteArrayEncoder extends MessageToByteEncoder<byte[]> | |
{ | |
@Override | |
protected void encode(ChannelHandlerContext ctx, byte[] msg, ByteBuf out) throws Exception | |
{ | |
out.writeBytes( msg ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment