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

Method storeFC

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

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 2

safeCloseMethod · 0.95
closeMethod · 0.80

Tested by

no test coverage detected