return DecodeResult.NEED_MORE_INPUT;
} else {
TIOStreamTransport transport = new TIOStreamTransport( new ChannelBufferInputStream(buffer));
TBinaryProtocol protocol = new TBinaryProtocol( transport );
short magic;
int messageLength;
try{
// protocol.readI32(); // skip the first message length
byte[] bytes = new byte[4];
transport.read( bytes, 0, 4 );
magic = protocol.readI16();
messageLength = protocol.readI32();
} catch ( TException e ) {
throw new IOException( e.getMessage(), e );