Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

converting from c++ to java

ilantalDec 19 2006 — edited Dec 19 2006
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2007
Added on Dec 19 2006
1 comment
80 views