This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
i intend to convert a integer (or short or long) that is greater than a byte can hold (eg, 1111) to a byte array, since casting is simply cannot be used here, any other way can do it without lose precise? I have tried to use Integer wrapper class and use its toBinaryString() to convert the int to a string representation, eg 5->"101", then I really cannot find a way of converting "101" to a byte array with correct binary representation. Please help Give Me any Examples