public static byte [ ] toByte ( int [ ] ia , int depth , boolean isBe ) { if ( depth == 24 ) if ( isBe ) return to24BE ( ia ) ; else return to24LE ( ia ) ; else if ( depth == 16 ) if ( isBe ) return to16BE ( ia ) ; else return to16LE ( ia ) ; throw new NotSupportedException ( "Conversion to " + depth + "bit " + ( isBe ? "big endian" : "little endian" ) + " is not supported." ) ; }
Generic integer - array to byte - array conversion