用vc6定义和生成的索引文件,请问在java中如何读出索引文件的内容?c++定义的索引文件的结构体如下,请大家指教,谢谢!
typedef struct a
{
int num;
int id;
byte[4] status;
long ctm;
long rtm;
int err;
byte[4] ext;
} ;typedef struct b
{
int id;
long et;
byte type;
byte cancel;
byte done;
byte extst;
long msglen;
long cvtm;
long etm;
int no;
int errid;
byte[4] ext;
} ;
typedef struct a
{
int num;
int id;
byte[4] status;
long ctm;
long rtm;
int err;
byte[4] ext;
} ;typedef struct b
{
int id;
long et;
byte type;
byte cancel;
byte done;
byte extst;
long msglen;
long cvtm;
long etm;
int no;
int errid;
byte[4] ext;
} ;
typedef __int64 jlong;
typedef signed char jbyte;
typedef unsigned char jboolean;
typedef unsigned short jchar;
typedef short jshort;
typedef float jfloat;
typedef double jdouble;
我给你的对照是jni中的c/C++与java类型对照关系
jint 与Java中的int类型对应
不知道这样说明不明白??????
呵呵!!
public class Dataoutput {
public static void main(String args[]) throws IOException {
DataInputStream dis = new DataInputStream(new FileInputStream(
"c:\\aa.txt"));
try {
System.out.println(dis.readInt());
System.out.println(dis.readInt());
......
}
finally {
dis.close();
}
}}