dcsimg
How to use a JAVA object to map to a 100-byte memory area?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Philip_Chang
Posted On:   Thursday, June 7, 2001 04:12 PM

If I read in a 100-byte file into a byte array, how can I then map it to a JAVA object that has 100 instance variables that contains values from the 100-byte array?


The Java object would be something like:




class MyRecord {


byte field1;


byte field2;


.....


byte field100;


}




I really don't want to use 100 assignment statements...

Re: How to use a JAVA object to map to a 100-byte memory area?

Posted By:   Anonymous  
Posted On:   Thursday, June 7, 2001 07:33 PM

Can't you use a byte array?



byte[] myRecord = new byte[100];



Regards
About | Sitemap | Contact