有人可以向我解释我的代码的行为吗?

时间:2015-03-09 22:54:24

标签: java arraylist bytearray

我正在开展一个小项目,我对Java代码的奇怪行为感到惊讶。

  public static void main(String[] args) throws NoSuchAlgorithmException {


        // getting the file
        File toCrypte = new File("sound.wav");

        try {
            //converting file to byte array
            byte[] bytes =Files.readAllBytes(Paths.get(toCrypte.toURI()));
  //                
 //                for (byte b : bytes) {
//                    System.out.print(b+" ");
//                }
            System.out.println("\n the size of the media: "+bytes.length);

            //fragmentation of file if too big
            byte[] wrapper=new byte[1024];
            ArrayList<byte[]> myfile=new ArrayList<byte[]>(1000);

            int loop=bytes.length/1024;
            if (loop*1024<bytes.length) {
                loop++;
            }
            int index=0;

            for (Integer i = 0; i < bytes.length; i++) {
                byte b = bytes[i];
  //                    System.out.println(b+" === "+bytes[i]);
                if (i!=0 && i%1024==0 ) {
                        for (byte b1 : wrapper) {
                            System.out.print(b1+" ");
                       }
                       System.out.println("");
                    myfile.add(index,wrapper);
                    loop--;
                    index++;
                }



                wrapper[i%1024]=b;

            }
            if (loop!=0) {
                myfile.add(wrapper);
                loop--;
            }

  //                Iterator<byte[]> currentToCypher = myfile.iterator();
  //                while (currentToCypher.hasNext()) {
  //                    byte[] bs = currentToCypher.next();
  //                    for (byte b : bs) {
  //                        System.out.print(b);
  //                    }
  //                    System.out.println("");
  //                }

  //                System.out.println(loop);

            /**
             * cripting all the data arrays
             */

           // generateKeys();

            for (int i = 0; i < myfile.size(); i++) {
                byte[] bs = myfile.get(i);
                for (byte b : bs) {
                    System.out.print(" "+b);
                }
                System.out.println("");
            }

        } catch (IOException ex) {
            Logger.getLogger(Rsa.class.getName()).log(Level.SEVERE, null, ex);
        }

}

我的第一个循环是给出以下结果(我只给出了前两行):

46 115 110 100 0 0 0 24 0 1 -122 -96 0 0 0 3 0 0 31 64 0 0 0 1 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 -1 -1 0 0 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 -1 -1 0 0 0 0 0 0 

我的第二个循环显示了这个结果:

-1 24 -3 121 -4 -30 -2 -68 -1 -69 1 -96 2 -122 2 122 2 25 0 -95 -1 -124 -3 82 -3 43 -2 77 -1 117 1 -89 1 -89 0 -45 -1 88 -2 -72 0 90 1 -118 2 -105 1 -104 -1 113 -3 60 -4 7 -3 -19 -1 -110 1 -65 2 -19 2 101 1 -126 -1 -40 -1 60 -2 45 -2 123 -1 -69 0 3 0 -34 0 76 -1 115 -2 -39 -1 8 0 -11 2 34 2 -114 1 93 -1 64 -3 -109 -4 -57 -2 126 0 27 1 106 2 14 1 34 0 110 -1 105 -1 -115 -1 -116 -1 -51 0 -94 0 23 0 6 -1 92 -2 -23 -1 13 -1 -104 1 48 1 -71 1 -107 0 -122 -1 54 -2 -103 -2 125 -1 -64 0 119 0 123 0 95 -1 -81 -1 -37 0 24 0 -96 0 -75 -1 -13 -1 -21 -1 85 -1 -97 0 11 0 6 0 4 -1 123 -1 -12 0 39 0 126 0 -91 0 66 0 17 -1 122 -1 -41 -1 -19 -1 -76 -1 -41 -1 -113 -1 -2 0 95 0 -93 0 -105 -1 -59 -1 -104 -1 91 -1 -46 0 -89 0 -75 0 116 -1 95 -1 6 -1 22 -1 -82 0 -47 1 41 1 13 0 2 -1 102 -1 54 -1 54 0 1 0 91 0 -114 0 118 -1 -5 -1 -99 -1 66 -1 -99 0 32 0 -92 1 31 0 -114 -1 -47 -2 -15 -2 -34 -1 -112 0 26 0 -19 0 -51 0 94 -1 -73 -1 109 -1 -58 -1 -58 0 67 0 86 0 48 0 28 -1 -48 -1 -98 -1 114 -1 -60 0 33 0 -118 0 -14 0 -116 -1 -35 -1 29 -2 -9 -1 -78 0 78 0 -15 0 -66 -1 -36 -1 57 -1 51 0 17 0 -123 0 -69 0 105 -1 -85 -1 125 -1 -97 -1 -21 0 10 0 34 0 18 0 10 0 78 0 43 -1 -13 -1 -68 -1 -84 0 28 0 42 0 58 0 30 -1 -88 -1 -109 -1 -65 0 90 0 121 0 92 0 33 -1 -111 -1 -122 -1 -51 0 65 0 94 0 54 -1 -36 -1 -128 -1 -35 0 37 0 90 0 79 -1 -21 -1 -16 -1 -53 -1 -44 0 0 -1 -29 -1 -1 0 45 0 114 0 26 -1 -87 -1 -87 -1 -55 0 66 0 117 0 85 -1 -87 -1 102 -1 -91 0 10 0 -94 0 120 0 22 -1 -73 -1 -97 -1 -13 0 41 0 36 -1 -6 -1 -60 -1 -112 -1 -36 0 109 0 -94 0 111 -1 -3 -1 127 -1 71 -1 -52 0 113 0 -120 0 37 -1 -114 -1 93 -1 -55 0 115 0 -82 0 120 0 16 -1 -90 -1 -59 -1 -103 -1 -79 -1 -45 -1 -9 0 108 0 109 0 83 -1 -88 -1 -57 0 12 0 64 0 107 -1 -36 -1 -75 -1 97 -1 -46 -1 -5 0 15 0 78 0 22 0 -104 0 58 0 12 -1 -63 -1 -100 -1 -12 -1 -35 -1 -8 -1 -116 -1 -34 0 65 0 106 0 -123 -1 -10 -1 -24 -1 -31 0 66 0 36 -1 -97 -1 -117 -1 121 0 57 0 71 0 26 -1 -10 0 0 0 -123 0 113 0 69 -1 101 -1 87 -1 -58 0 30 0 107 -1 -61 -1 -65 -1 -54 0 -128 0 -102 0 39 -1 -24 -1 -113 0 36 -1 -17 -1 -33 -1 -107 -1 -61 0 90 0 94 0 102 -1 127 -1 -94 0 39 0 -100 0 -107 -1 -89 -1 90 -1 79 0 46 0 105 0 53 0 1 -1 -41 0 102 0 24 1 123 2 -69 1 -59 1 62 -1 71 -1 66 -2 71 -3 -6 -1 -87 -1 -70 1 93 0 -2 0 -127 -1 -37 -2 -59 0 -106 1 10 1 -102 0 -76 -2 -77 -3 -30 -3 6 -1 -107 1 37 1 -49 2 33 0 112 0 34 -1 99 0 43 -1 -25 -2 -103 -1 14 -2 78 -1 -5 1 11 1 -104 1 -99 -1 -95 0 0 -1 -114 -1 -1 0 99 -1 -110 -1 113 -2 53 -1 90 0 23 0 97 1 -114 1 19 1 118 0 -74 0 58 -2 -8 -3 11 -3 -38 -2 111 1 6 2 -77 2 113 1 -126 -2 -113 -2 -104 -1 42 0 97 1 -119 0 107 -1 100 -3 86 -2 15 -1 -109 0 -52 2 -57 2 90 1 -21 0 75 -2 -7 -3 -7 -4 -80 -2 68 -1 76 1 122 2 -78 1 -48 1 5 -2 -91 -1 5 0 19 0 -27 1 105 -1 -93 -2 96 -4 -77 -3 -35 0 67 1 -115 3 94 2 -125 1 -109 0 10 -2 -54 -2 57 -4 -30 -2 73 -1 34 0 -46 2 77 1 110 1 38 -1 66 -1 -74 0 -18 1 49 1 42 -2 -51 -3 125 -4 90 -3 -21 1 4 2 21 3 48 1 -13 0 -55 0 10 -1 -107 -1 -82 -3 -12 -2 17 -3 -13 -2 -37 1 62 1 -86 2 100 0 -22 0 42 0 105 -1 -20 0 105 -1 68 -2 -68 -3 -57 -3 -8 -1 -52 0 61 1 -63 2 28 2 34 1 -47 0 -105 -1 -126 -3 6 -4 -22 -3 -50 -1 66 1 -23 2 21 1 -59 0 20 -1 53 0 71 0 -75 1 -105 0 126
 -1 24 -3 121 -4 -30 -2 -68 -1 -69 1 -96 2 -122 2 122 2 25 0 -95 -1 -124 -3 82 -3 43 -2 77 -1 117 1 -89 1 -89 0 -45 -1 88 -2 -72 0 90 1 -118 2 -105 1 -104 -1 113 -3 60 -4 7 -3 -19 -1 -110 1 -65 2 -19 2 101 1 -126 -1 -40 -1 60 -2 45 -2 123 -1 -69 0 3 0 -34 0 76 -1 115 -2 -39 -1 8 0 -11 2 34 2 -114 1 93 -1 64 -3 -109 -4 -57 -2 126 0 27 1 106 2 14 1 34 0 110 -1 105 -1 -115 -1 -116 -1 -51 0 -94 0 23 0 6 -1 92 -2 -23 -1 13 -1 -104 1 48 1 -71 1 -107 0 -122 -1 54 -2 -103 -2 125 -1 -64 0 119 0 123 0 95 -1 -81 -1 -37 0 24 0 -96 0 -75 -1 -13 -1 -21 -1 85 -1 -97 0 11 0 6 0 4 -1 123 -1 -12 0 39 0 126 0 -91 0 66 0 17 -1 122 -1 -41 -1 -19 -1 -76 -1 -41 -1 -113 -1 -2 0 95 0 -93 0 -105 -1 -59 -1 -104 -1 91 -1 -46 0 -89 0 -75 0 116 -1 95 -1 6 -1 22 -1 -82 0 -47 1 41 1 13 0 2 -1 102 -1 54 -1 54 0 1 0 91 0 -114 0 118 -1 -5 -1 -99 -1 66 -1 -99 0 32 0 -92 1 31 0 -114 -1 -47 -2 -15 -2 -34 -1 -112 0 26 0 -19 0 -51 0 94 -1 -73 -1 109 -1 -58 -1 -58 0 67 0 86 0 48 0 28 -1 -48 -1 -98 -1 114 -1 -60 0 33 0 -118 0 -14 0 -116 -1 -35 -1 29 -2 -9 -1 -78 0 78 0 -15 0 -66 -1 -36 -1 57 -1 51 0 17 0 -123 0 -69 0 105 -1 -85 -1 125 -1 -97 -1 -21 0 10 0 34 0 18 0 10 0 78 0 43 -1 -13 -1 -68 -1 -84 0 28 0 42 0 58 0 30 -1 -88 -1 -109 -1 -65 0 90 0 121 0 92 0 33 -1 -111 -1 -122 -1 -51 0 65 0 94 0 54 -1 -36 -1 -128 -1 -35 0 37 0 90 0 79 -1 -21 -1 -16 -1 -53 -1 -44 0 0 -1 -29 -1 -1 0 45 0 114 0 26 -1 -87 -1 -87 -1 -55 0 66 0 117 0 85 -1 -87 -1 102 -1 -91 0 10 0 -94 0 120 0 22 -1 -73 -1 -97 -1 -13 0 41 0 36 -1 -6 -1 -60 -1 -112 -1 -36 0 109 0 -94 0 111 -1 -3 -1 127 -1 71 -1 -52 0 113 0 -120 0 37 -1 -114 -1 93 -1 -55 0 115 0 -82 0 120 0 16 -1 -90 -1 -59 -1 -103 -1 -79 -1 -45 -1 -9 0 108 0 109 0 83 -1 -88 -1 -57 0 12 0 64 0 107 -1 -36 -1 -75 -1 97 -1 -46 -1 -5 0 15 0 78 0 22 0 -104 0 58 0 12 -1 -63 -1 -100 -1 -12 -1 -35 -1 -8 -1 -116 -1 -34 0 65 0 106 0 -123 -1 -10 -1 -24 -1 -31 0 66 0 36 -1 -97 -1 -117 -1 121 0 57 0 71 0 26 -1 -10 0 0 0 -123 0 113 0 69 -1 101 -1 87 -1 -58 0 30 0 107 -1 -61 -1 -65 -1 -54 0 -128 0 -102 0 39 -1 -24 -1 -113 0 36 -1 -17 -1 -33 -1 -107 -1 -61 0 90 0 94 0 102 -1 127 -1 -94 0 39 0 -100 0 -107 -1 -89 -1 90 -1 79 0 46 0 105 0 53 0 1 -1 -41 0 102 0 24 1 123 2 -69 1 -59 1 62 -1 71 -1 66 -2 71 -3 -6 -1 -87 -1 -70 1 93 0 -2 0 -127 -1 -37 -2 -59 0 -106 1 10 1 -102 0 -76 -2 -77 -3 -30 -3 6 -1 -107 1 37 1 -49 2 33 0 112 0 34 -1 99 0 43 -1 -25 -2 -103 -1 14 -2 78 -1 -5 1 11 1 -104 1 -99 -1 -95 0 0 -1 -114 -1 -1 0 99 -1 -110 -1 113 -2 53 -1 90 0 23 0 97 1 -114 1 19 1 118 0 -74 0 58 -2 -8 -3 11 -3 -38 -2 111 1 6 2 -77 2 113 1 -126 -2 -113 -2 -104 -1 42 0 97 1 -119 0 107 -1 100 -3 86 -2 15 -1 -109 0 -52 2 -57 2 90 1 -21 0 75 -2 -7 -3 -7 -4 -80 -2 68 -1 76 1 122 2 -78 1 -48 1 5 -2 -91 -1 5 0 19 0 -27 1 105 -1 -93 -2 96 -4 -77 -3 -35 0 67 1 -115 3 94 2 -125 1 -109 0 10 -2 -54 -2 57 -4 -30 -2 73 -1 34 0 -46 2 77 1 110 1 38 -1 66 -1 -74 0 -18 1 49 1 42 -2 -51 -3 125 -4 90 -3 -21 1 4 2 21 3 48 1 -13 0 -55 0 10 -1 -107 -1 -82 -3 -12 -2 17 -3 -13 -2 -37 1 62 1 -86 2 100 0 -22 0 42 0 105 -1 -20 0 105 -1 68 -2 -68 -3 -57 -3 -8 -1 -52 0 61 1 -63 2 28 2 34 1 -47 0 -105 -1 -126 -3 6 -4 -22 -3 -50 -1 66 1 -23 2 21 1 -59 0 20 -1 53 0 71 0 -75 1 -105 0 126

请知道我在哪里添加相同的包装器(相同的数据到ArrayList)?

1 个答案:

答案 0 :(得分:0)

嗨,我只是在wrapper=new byte[1024];

之后添加了一个新的实例myfile.add(index,wrapper);

似乎是一些指针问题。

现在我的代码工作正常。