[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Some Java and C memory problems

Hi Santosh,

Integers in Java are four bytes long, and are unconditionally signed. Anyway, this may suit your purpose if the matter is limited to C-int to Java-int transportation. Not if it involves 'memcpy'; for this entails the sequence of the exact bytes to be present.

Anyway, it is a better idea to encapsulate the conversion to automatically be done in a method (or the constructor itself).

Essentially, accomodating relevant changes to transport mere functions like 'memcpy' defeats the purpose of Java, revise the design-philosophy of your program. You'll hopefully come out with a better solution.



123India.com - India's Premier Portal 
Get your Free Email Account at http://www.123india.com