Scratching my head, it sounds pretty simple though. A DECIMAL type is probably implemented (for you) as a BigDecimal....
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
You can toString() that type. Once you've got a string, you're most of the way to BCD. Take each character, subtract "0" and stuff the result in a byte of a byte array. For signed numbers, that's a trickier proposition and depends on the packed format; I don't recall any signed BCD formats offhand.
Dig Deeper on Open source Web and application servers
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.