public void emb(byte[] byte2emb) throws IOException {
        // 获得Y的colorid
        Integer colorid = (Integer) mImg.getColorIDs().toArray()[0];
        // 获得Y的color unit
        JPEGDataUnits dataUnits = mImg.getDataUnits();
        List<int[]> YUnits = dataUnits.getColorUnit(colorid);

        // 打乱数据顺序
        try {
            JPEGDataUnits shuffled = shuffleDataUnits(dataUnits, mImg.getColorIDs());
            mImg.setDataUnits(shuffled);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        // 重新获取jpeg数据块
        dataUnits = mImg.getDataUnits();

        // 对图像数据进行平移,达到直方图中( POSITION_BASE-1, P_RIGHT+1 )处位置空出用以嵌入数据.
        int slot = byte2emb.length / YUnits.size() + 1;
        List<EmbInfo> embInfos = shiftData(dataUnits, colorid, slot);

        // 无用的成员变量
//        mRandomTable = new int[dataUnits.getColorUnit(colorid).size()];
//        for (int i = 0; i != YUnits.size(); ++i){
//            mRandomTable[i] = mRandom.nextInt();
//        }
//        mMask = new int[YUnits.size()];

        // 嵌入信息
        ByteArrayInputStream is = new ByteArrayInputStream(byte2emb);
        BitInputStream bis = new BitInputStream(is);

        for (EmbInfo embinfo: embInfos){
            try {
                int bit = bis.readBit();
                int newVal = dataUnits.get(colorid, embinfo.unit_no, embinfo.AC_no);
                if ( bit==0 ) { //嵌入0，0 --> -1
                    System.out.println(String.format("%3s -> %3s",newVal,newVal-bit));
                    newVal -= 1;
                }else{          //嵌入1，0 --> 1
                    System.out.println(String.format("%3s -> %3s",newVal,newVal+bit));
                    newVal += 1;
                }
                dataUnits.put(colorid, embinfo.unit_no, embinfo.AC_no, newVal);
            } catch (EOFException e) {
                // 信息已经全部嵌入,跳出
                break;
            }
        }

        // Debug :
//        dataUnits = JPEGDataUnits.getDebugDataUnit();
        // End Debug.

        Historgram[] historgrams = dataUnits.getHistorgram(colorid);
        System.out.print("Embed  = ");for (int i=0;i!=64;++i){System.out.print(i+":");historgrams[i].print(System.out);}

        try {
            mImg.save(mImg.getFilePath()+"_encrypted.jpg");
        } catch (JPEGParser.InvalidJpegFormatException e) {
            System.err.println("错误的图像信息!");
        }
    }