Read binary data

hi, I am reading binary data from a binary file. Now I have no idea of it.

I have some question to ask.

1) Are the strings ZeroStrings or FixedZeroStrings?

2)How to position the position of each strings?

My binary input is space delimited with fixed width data fields.

All integers are 4 bytes, floats are 8 bytes, strings are 4 btyes.

The file format is:(ignore comment what I added)

m n

10.000.00

0.00.210.21

0.210.210.00

20.630.00

0.480.000.48

0.000.630.21

40.630.63

0.630.420.63

0.420.420.42

40.000.63

0.210.630.21

0.420.210.42

0.560.450.84

0.120.23

...// Total m groups numbers

Mixture ID

Energy Group 1

Energy Group 2

Energy Group 3

Energy Group 4

Energy Group 5

Energy Group n-1// Total n strings

1 0.0000000E+001.0000001.0000001.000000

1.0000001.0000001.0000001.0000001.000000

1.0000001.0000001.0000001.0000000.0000000E+00

21.0000000.0000000E+00 0.0000000E+00 0.0000000E+00//group 1

0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00

0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.3999998// group 2

31.0000000.0000000E+00 0.0000000E+00 0.0000000E+00

0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+00

0.0000000E+00 0.0000000E+00 0.0000000E+00 0.0000000E+001.000000

....

n 0.0000000E+001.0000001.0000001.000000

1.0000001.0000001.0000001.0000001.000000

1.0000001.0000001.0000001.0000000.0000000E+00//group n

// Total n groups data respectly to the n strings

Any help will be appreciated!

[1939 byte] By [ardmorea] at [2007-11-27 10:14:54]
# 1

> 1) Are the strings ZeroStrings or FixedZeroStrings?

I don't know what either of those is but you answered your own question when you stated that all the strings are 4 bytes. This sounds distinctly wrong but it's what you said.

Either you know the format of your own file or you don't. Nobody here can help you with that.

> 2)How to position the position of each strings?

I don't understand the question.

ejpa at 2007-7-28 15:36:14 > top of Java-index,Core,Core APIs...
# 2

ok, please ignore all wrong parts.

I have just one question.

Suppose the first line only has two integers,total 2*4=8 bytes, then a return carriage.

How to jump in the second line?I mean how many bytes will be skiped?

Thanks

ardmorea at 2007-7-28 15:36:14 > top of Java-index,Core,Core APIs...
# 3

If the line terminator is \r\n it is two bytes, if it is \n it is one byte. Add that to the two by four for the integers.

ejpa at 2007-7-28 15:36:14 > top of Java-index,Core,Core APIs...