MCPcopy Create free account
hub / github.com/badvision/jace / writeLibraryToDisk

Method writeLibraryToDisk

src/main/java/jace/library/MediaCache.java:273–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271 }
272
273 public void writeLibraryToDisk() {
274 ObjectOutputStream out = null;
275 try {
276 File mediaCatalogFile = getMediaLibaryCatalog();
277 out = new ObjectOutputStream(new FileOutputStream(mediaCatalogFile));
278 for (MediaEntry e : mediaLookup.values()) {
279 out.writeObject(e);
280 }
281 out.close();
282 } catch (FileNotFoundException ex) {
283 Logger.getLogger(MediaCache.class.getName()).log(Level.SEVERE, null, ex);
284 } catch (IOException ex) {
285 Logger.getLogger(MediaCache.class.getName()).log(Level.SEVERE, null, ex);
286 } finally {
287 try {
288 if (out != null) {
289 out.close();
290 }
291 } catch (IOException ex) {
292 Logger.getLogger(MediaCache.class.getName()).log(Level.SEVERE, null, ex);
293 }
294 }
295 }
296 Thread writerWorker;
297
298 public void markDirty() {

Callers 1

runMethod · 0.95

Calls 5

getMediaLibaryCatalogMethod · 0.95
writeObjectMethod · 0.80
closeMethod · 0.80
getNameMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected