protected abstract ChannelBuffer getData();
public ChannelBuffer getFullData() {
final ChannelBuffer channelBuffer = ChannelBuffers.dynamicBuffer();
channelBuffer.writeByte(0x7f);
channelBuffer.writeByte(getType());
final ChannelBuffer encryptedData = getData();
int len = encryptedData.readableBytes();
byte[] lenBytes = new byte[]{(byte) (len >>> 16), (byte) (len >>> 8), (byte) len};
channelBuffer.writeBytes(lenBytes);
channelBuffer.writeBytes(encryptedData);