MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / toStream

Method toStream

ij/src/main/java/ij/gui/Plot.java:409–419  ·  view source on GitHub ↗
(OutputStream os)

Source from the content-addressed store, hash-verified

407 // toStream(pos);
408 // } catch(Exception e) {IJ.handleException(e);}
409 void toStream(OutputStream os) throws IOException {
410 //prepare
411 for (PlotObject plotObject : pp.getAllPlotObjects()) //make sure all fonts are set properly
412 if (plotObject != null)
413 plotObject.setFont(nonNullFont(plotObject.getFont(), currentFont));
414 pp.rangeMinMax = currentMinMax;
415 //write
416 ObjectOutputStream out = new ObjectOutputStream(os);
417 out.writeObject(pp);
418 out.writeObject(allPlotObjects);
419 }
420
421 /** Writes this plot into a byte array containing (1) the serialized PlotProperties and
422 * (2) the serialized Vector of all 'added' PlotObjects.

Callers 1

toByteArrayMethod · 0.95

Calls 4

nonNullFontMethod · 0.95
getAllPlotObjectsMethod · 0.80
setFontMethod · 0.65
getFontMethod · 0.65

Tested by

no test coverage detected