使用 ISOMsg 打包的字段 64 错误
这是我的代码
ISOMsg o = new ISOMsg();
o.set(64, "00000000");
byte[] data = o.pack();
错误:
Exception in thread "main" org.jpos.iso.ISOException: org.jpos.iso.IFA_BINARY Problem packing field 64 (java.lang.ClassCastException: java.lang.String cannot be cast to [B)
at org.jpos.iso.ISOBinaryFieldPackager.pack(ISOBinaryFieldPackager.java:120)
at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:119)
at org.jpos.iso.ISOMsg.pack(ISOMsg.java:333)
at ISO.Client.main(Client.java:53)
Nested:java.lang.ClassCastException: java.lang.String cannot be cast to [B
at org.jpos.iso.ISOBinaryFieldPackager.pack(ISOBinaryFieldPackager.java:105)
at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:119)
at org.jpos.iso.ISOMsg.pack(ISOMsg.java:333)
at ISO.Client.main(Client.java:53)
Java Result: 1