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:
+3
-3
@@ -1,13 +1,13 @@
|
||||
apply plugin:'java'
|
||||
apply plugin: 'maven'
|
||||
defaultTasks 'build'
|
||||
version='1.5.2'
|
||||
version='1.5.3-SNAPSHOT'
|
||||
description='Java implementation of the ISO 8583 protocol, focused on making the creation, edition and reading of ISO8583 messages as simple and flexible as possible.'
|
||||
sourceCompatibility='1.6'
|
||||
targetCompatibility='1.6'
|
||||
group='net.sf.j8583'
|
||||
|
||||
buildscript {
|
||||
/*buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -16,7 +16,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'org.gradle.plugins:gradle-signing-plugin:0.0.1-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
@@ -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