MCPcopy Create free account
hub / github.com/ForOhForError/Yet-Another-Magic-Card-Recognizer / storeFCAlt

Method storeFCAlt

src/Benchmark.java:152–170  ·  view source on GitHub ↗
(int[] ints)

Source from the content-addressed store, hash-verified

150 }
151
152 @SuppressWarnings("resource")
153 private static void storeFCAlt(int[] ints) {
154 ByteBuffer buffer = ByteBuffer.allocate(4 * ints.length);
155 for (int i : ints)
156 buffer.putInt(i);
157
158 FileChannel fc = null;
159 try {
160 fc = new FileInputStream("").getChannel();
161 fc = new FileOutputStream("fcalt.out").getChannel();
162 fc.write(buffer);
163 } catch (FileNotFoundException e) {
164 e.printStackTrace();
165 } catch (IOException e) {
166 e.printStackTrace();
167 } finally {
168 safeClose(fc);
169 }
170 }
171
172 // safe close helpers
173

Callers 1

writeMethod · 0.95

Calls 2

safeCloseMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected