资源简介
iso8583协议的java实现,适用于金融业中套用此协议的开发。如银联缴费接口等
代码片段和文件信息
/*
j8583 A Java implementation of the ISO8583 protocol
Copyright (C) 2007 Enrique Zamudio Lopez
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License or (at your option) any later version.
This library is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not write to the Free Software
Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02110-1301 USA
*/
package com.solab.iso8583;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.Hashtable;
import java.util.Iterator;
/** Represents an ISO8583 message. This is the core class of the framework.
* Contains the bitmap which is modified as fields are added/removed.
* This class makes no assumptions as to what types belong in each field
* nor what fields should each different message type have; that is left
* for the developer since the different ISO8583 implementations can vary
* greatly.
*
* @author Enrique Zamudio
*/
public class IsoMessage {
static final byte[] HEX = new byte[]{ ‘0‘ ‘1‘ ‘2‘ ‘3‘ ‘4‘ ‘5‘ ‘6‘ ‘7‘ ‘8‘ ‘9‘ ‘A‘ ‘B‘ ‘C‘ ‘D‘ ‘E‘ ‘F‘ };
/** The message type. */
private int type;
/** Indicates if the message is binary-coded. */
private boolean binary;
/** This is where the values are stored. */
private Hashtable fields = new Hashtable();
/** Stores the optional ISO header. */
private String isoHeader;
private int etx = -1;
/** Creates a new empty message with no values set. */
public IsoMessage() {
}
/** Creates a new message with the specified ISO header. This will be prepended to the message. */
IsoMessage(String header) {
isoHeader = header;
}
/** Returns the ISO header that this message was created with. */
public String getIsoHeader() {
return isoHeader;
}
/** Sets the ISO message type. Common values are 0x200 0x210 0x400 0x410 0x800 0x810. */
public void setType(int value) {
type = value;
}
/** Returns the ISO message type. */
public int getType() {
return type;
}
/** Indicates whether the message should be binary. Default is false. */
public void setBinary(boolean flag) {
binary = flag;
}
/** Returns true if the message is binary coded; default is false. */
public boolean isBinary() {
return binary;
}
/** Sets the ETX character which is sent at the end of the message as a terminator.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2008-01-21 19:31 src\
目录 0 2008-01-21 19:31 src\com\
目录 0 2008-01-21 19:31 src\com\solab\
目录 0 2008-01-21 19:31 src\com\solab\iso8583\
目录 0 2008-01-21 19:31 src\com\solab\iso8583\impl\
目录 0 2008-01-21 19:31 src\com\solab\iso8583\parse\
目录 0 2008-01-21 19:31 src\j8583\
目录 0 2008-01-21 19:31 src\j8583\example\
文件 10361 2008-01-21 19:59 src\com\solab\iso8583\IsoMessage.java
文件 6719 2008-01-21 20:04 src\com\solab\iso8583\IsoType.java
文件 7002 2008-01-21 19:36 src\com\solab\iso8583\IsoValue.java
文件 11545 2008-01-21 20:00 src\com\solab\iso8583\MessageFactory.java
文件 1356 2008-01-21 19:31 src\com\solab\iso8583\TraceNumberGenerator.java
文件 1952 2008-01-21 19:31 src\com\solab\iso8583\impl\SimpleTraceGenerator.java
文件 305 2008-01-21 19:31 src\com\solab\iso8583\package.html
文件 6780 2008-01-21 20:06 src\com\solab\iso8583\parse\ConfigParser.java
文件 8756 2008-01-21 19:52 src\com\solab\iso8583\parse\FieldParseInfo.java
文件 505 2008-01-21 19:31 src\com\solab\iso8583\parse\j8583.dtd
文件 211 2008-01-21 19:31 src\com\solab\iso8583\parse\package.html
文件 5050 2008-01-21 20:08 src\j8583\example\Client.java
文件 3351 2008-01-21 20:10 src\j8583\example\Example.java
文件 4260 2008-01-21 20:14 src\j8583\example\Server.java
文件 3443 2008-01-21 19:31 src\j8583\example\config.xm
文件 602 2008-01-21 19:31 src\j8583\example\package.html
文件 578 2008-01-21 19:31 src\j8583\example\parse.txt
文件 203 2008-01-21 19:31 src\log4j.properties
文件 2904 2008-01-21 20:19 build.xm
目录 0 2008-01-21 20:17 example\
文件 158 2008-01-21 20:17 example\run-channel-server.sh
文件 151 2007-06-07 18:44 example\run-client.sh
文件 151 2007-06-07 18:44 example\run-server.sh
............此处省略0个文件信息
相关资源
- java编写整合操作系统五个算法
- Java Socket编写的教学管理系统(简易版
- JAVA写的编译器编译原理课设
- \“java实现简单的单点登录\“源码包
- 学生选课管理系统JAVA+SQL
- Eclipse Java注释模板
- java高校就业管理系统源码
- Mongodb + GridFS +Java 操作Mongodb中存储的
- 基于MyEclipse开发的超市管理系统
- java web静态网页制作代码
- java编写的宠物医院管理系统
- Java语言程序设计课后习题解答+张思民
- java sound 简单播放器代码
- java写的方向键盘控制的简易画图工具
- JAVA编写的驾校在线考试系统
- 象棋游戏java代码
- 支持向量机算法实现Java、python、mat
- JAVA工具模块TBOX
- 广工java文本编辑器课设源代码
- java 模拟进程调度
- java绘制股票走势图
- java,socket聊天,单聊,群聊,传文件
- 在线投票小程序java源代码
- java ajax上传文件并显示进度条
- Java多线程赛马游戏
- jdk-8u221-linux-x64.tar.gz
- javax.servlet-api-3.0.1-sources.jar
- Java版数据结构与算法视频教程(20集
- java-ymodem/xmodem上位机源码
- C4.5决策树Java实现
评论
共有 条评论