private static LessDataPacket decode(ByteBuffer in){
		LessDataPacket ret = new LessDataPacket();
		while (in.hasRemaining()) {  
			try {
				int state = decode1(in,ret);
				if(LessCodec.OK == state){
					return ret;
				}else if(LessCodec.NOT_OK == state){
					return null;
				}else if(LessCodec.NEED_DATA == state && in.remaining() < 3){
					return null;
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
	    }
		return null;
	}