IsoMessage has some Scala interop, you can use from Scala stuff like m(4) to get IsoValue at field 4, and also set it m(4)=IsoValue.DATE10.call(new Date())
git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@89 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
@@ -361,6 +361,14 @@ public class IsoMessage {
|
||||
return getField(i);
|
||||
}
|
||||
|
||||
//These are for Scala compat
|
||||
public void update(int i, IsoValue<?> v) {
|
||||
setField(i, v);
|
||||
}
|
||||
public IsoValue<?> apply(int i) {
|
||||
return getField(i);
|
||||
}
|
||||
|
||||
/** Copies the specified fields from the other message into the recipient. If a specified field is
|
||||
* not present in the source message it is simply ignored. */
|
||||
public void copyFieldsFrom(IsoMessage src, int...idx) {
|
||||
|
||||
@@ -48,10 +48,10 @@ public class Date4ParseInfo extends FieldParseInfo {
|
||||
cal.set(Calendar.HOUR, 0);
|
||||
cal.set(Calendar.MINUTE, 0);
|
||||
cal.set(Calendar.SECOND, 0);
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
//Set the month in the date
|
||||
cal.set(Calendar.MONTH, ((buf[pos] - 48) * 10) + buf[pos + 1] - 49);
|
||||
cal.set(Calendar.DATE, ((buf[pos + 2] - 48) * 10) + buf[pos + 3] - 48);
|
||||
cal.set(Calendar.MILLISECOND,0);
|
||||
Date10ParseInfo.adjustWithFutureTolerance(cal);
|
||||
return new IsoValue<Date>(type, cal.getTime(), null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user