comparison java/src/com/aurellem/gb/Gb.java @ 81:db8e0a563c8e

generated intro
author Robert McIntyre <rlm@mit.edu>
date Fri, 09 Mar 2012 01:43:25 -0600
parents ad6ebe886a21
children 95cb2152d7cd
comparison
equal deleted inserted replaced
80:ad6ebe886a21 81:db8e0a563c8e
62 for (int i = position; i > 0; i--){ 62 for (int i = position; i > 0; i--){
63 if (0 != buf.get(i)){ 63 if (0 != buf.get(i)){
64 position = i; 64 position = i;
65 break; 65 break;
66 }} 66 }}
67 System.out.println("Position: " + position);
68 byte[] saveArray = new byte[position]; 67 byte[] saveArray = new byte[position];
69 ByteBuffer save = createDirectByteBuffer(position); 68 ByteBuffer save = createDirectByteBuffer(position);
70 buf.get(saveArray, 0 , position); 69 buf.get(saveArray, 0 , position);
71 save.put(saveArray); 70 save.put(saveArray);
72 save.rewind(); 71 save.rewind();