| 132 | } |
| 133 | |
| 134 | @SuppressWarnings("unused") |
| 135 | private static void storeFC(int[] ints) { |
| 136 | FileOutputStream out = null; |
| 137 | try { |
| 138 | out = new FileOutputStream("fc.out"); |
| 139 | FileChannel file = out.getChannel(); |
| 140 | ByteBuffer buf = file.map(FileChannel.MapMode.READ_WRITE, 0, 4 * ints.length); |
| 141 | for (int i : ints) { |
| 142 | buf.putInt(i); |
| 143 | } |
| 144 | file.close(); |
| 145 | } catch (IOException e) { |
| 146 | throw new RuntimeException(e); |
| 147 | } finally { |
| 148 | safeClose(out); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | @SuppressWarnings("resource") |
| 153 | private static void storeFCAlt(int[] ints) { |