title: How to avoid sign extending bit mask in Java?
body: <p>My bit masks are bytes, and I'd like to keep them exactly as they are, but I think they're sign extended.  I don't care if the byte is considered positive or negative, as long as it has the same bits set.  I just spent a few hours debugging my code, and then I found I'm only having a problem with my byte bit masks when they happen to be negative, it took a while to find out.  I can't be the only one who's had a problem with this.  Is there a way to make a byte behave as if it was unsigned?</p>