private static Byte[] byte2DToByte ( byte[][] dd )
    {
        Byte[] d = new Byte[ dd.length*dd[0].length ];
        for ( int n = 0; n < dd[0].length; n++ )
        {
            for ( int m = 0; m < dd.length; m++ )
            {
                d[ m+n*dd.length ] = dd[m][n]; 
            }
        }
        return d;
    }
private static Byte [ ] byte2DToByte ( byte [ ] [ ] dd ) { Byte [ ] d = new Byte [ dd . length * dd [ 0 ] . length ] ; for ( int n = 0 ; n < dd [ 0 ] . length ; n ++ ) { for ( int m = 0 ; m < dd . length ; m ++ ) { d [ m + n * dd . length ] = dd [ m ] [ n ] ; } } return d ; }
Converts byte[][] to Byte[]

@param dd
@return