converting from c++ to java
ilantalDec 19 2006 — edited Dec 19 2006I have a buffer from a file input stream which I want to analyse.
I want to look at the information either as a byte, short or int.
In c++ I could make a union of pointers
union{ short *w; int *i; char* c;} buff;
and point to anywhere in the buffer I wanted.
What is the equivalent thing to do in java?
Thanks,
Ilan