static byte [ ] append ( byte [ ] data , boolean [ ] toAppend ) { byte [ ] toAppendBytes = new byte [ toAppend . length ] ; for ( int i = 0 ; i < toAppend . length ; i ++ ) { toAppendBytes [ i ] = toAppend [ i ] ? ( byte ) 1 : ( byte ) 0 ; } return append ( data , toAppendBytes ) ; }
append appends a boolean array to an existing byte array