Click here to Skip to main content
15,891,633 members
Home / Discussions / Java
   

Java

 
AnswerRe: JAVA program to check please answer Pin
Luc Pattyn5-Oct-10 11:59
sitebuilderLuc Pattyn5-Oct-10 11:59 
GeneralRe: JAVA program to check please answer Pin
vivek8865-Oct-10 22:52
vivek8865-Oct-10 22:52 
GeneralRe: JAVA program to check please answer Pin
Nagy Vilmos5-Oct-10 23:15
professionalNagy Vilmos5-Oct-10 23:15 
Questionstructure equivalant in java Pin
trioum5-Oct-10 3:12
trioum5-Oct-10 3:12 
AnswerRe: structure equivalant in java Pin
TorstenH.5-Oct-10 3:18
TorstenH.5-Oct-10 3:18 
AnswerRe: structure equivalant in java Pin
Richard MacCutchan5-Oct-10 5:57
mveRichard MacCutchan5-Oct-10 5:57 
GeneralRe: structure equivalant in java Pin
trioum5-Oct-10 6:58
trioum5-Oct-10 6:58 
GeneralRe: structure equivalant in java Pin
jschell5-Oct-10 12:27
jschell5-Oct-10 12:27 
trioum wrote:
Now I want to convert same c programme in java due to some technical reason


Then you have some work to do.

The original implementation made assumptions about the layout of the data in memory. Or maybe they just completely ignored it because they didn't understand it at all.

And you must determine what that layout is and then match it exactly.

For starters you will need to know the size of 'int' and whether it is big endian or little endian. You need to determine the exact binary format that the 'int' takes in memory so you can determine how it would be written to a file.

And you must do the same for every other data item in the struct.

Finally you must account for the fact that the struct might be padded at the end. So there might be one or more random bytes which are not explicitly represented in the structure.
GeneralRe: structure equivalant in java Pin
Dave Doknjas5-Oct-10 13:03
Dave Doknjas5-Oct-10 13:03 
GeneralRe: structure equivalant in java Pin
trioum5-Oct-10 21:28
trioum5-Oct-10 21:28 
GeneralRe: structure equivalant in java Pin
Richard MacCutchan5-Oct-10 21:44
mveRichard MacCutchan5-Oct-10 21:44 
GeneralRe: structure equivalant in java Pin
trioum5-Oct-10 22:57
trioum5-Oct-10 22:57 
GeneralRe: structure equivalant in java Pin
Richard MacCutchan5-Oct-10 23:03
mveRichard MacCutchan5-Oct-10 23:03 
GeneralRe: structure equivalant in java Pin
Nagy Vilmos5-Oct-10 23:16
professionalNagy Vilmos5-Oct-10 23:16 
GeneralRe: structure equivalant in java Pin
trioum6-Oct-10 1:19
trioum6-Oct-10 1:19 
GeneralRe: structure equivalant in java Pin
TorstenH.6-Oct-10 1:59
TorstenH.6-Oct-10 1:59 
GeneralRe: structure equivalant in java Pin
Nagy Vilmos6-Oct-10 2:08
professionalNagy Vilmos6-Oct-10 2:08 
GeneralRe: structure equivalant in java Pin
David Skelly6-Oct-10 4:25
David Skelly6-Oct-10 4:25 
GeneralRe: structure equivalant in java Pin
trioum6-Oct-10 4:58
trioum6-Oct-10 4:58 
GeneralRe: structure equivalant in java Pin
trioum6-Oct-10 6:22
trioum6-Oct-10 6:22 
GeneralRe: structure equivalant in java Pin
David Skelly6-Oct-10 6:59
David Skelly6-Oct-10 6:59 
GeneralRe: structure equivalant in java Pin
trioum6-Oct-10 22:34
trioum6-Oct-10 22:34 
QuestionRe: structure equivalant in java Pin
David Crow7-Oct-10 10:00
David Crow7-Oct-10 10:00 
QuestionAlarm Clock Help Pin
Autunmsky224-Oct-10 17:32
Autunmsky224-Oct-10 17:32 
AnswerRe: Alarm Clock Help Pin
Richard MacCutchan4-Oct-10 22:09
mveRichard MacCutchan4-Oct-10 22:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.