JAVA 将一个消息转发给一个回调方法,而该回调方法的参数类型不是Spring所支持的默认类型时,报错
Callback argument class [B requires custom type conversion
static class FSerialDataCallBack implements HCNetSDK.FSerialDataCallBack_V40 {
@Override
public void invoke(int lSerialHandle, int lCHannel, byte[] pRecvDataBuffer, int dwBufSize, Pointer pUser) {
System.out.println("HELLO WORD");
return;
}
}
public static interface FSerialDataCallBack_V40 extends Callback {
public void invoke(int lSerialHandle, int lCHannel, byte[] pRecvDataBuffer, int dwBufSize, Pointer pUser);
}