@Test public void rasterizeToTemporaryFileReusesFile() throws Exception { writeTestFile(this.temporaryFile); File tfile = this.mocker.getComponentUnderTest().rasterizeToTemporaryFile(VALID_SVG, 100, 200); Assert.assertEquals(this.temporaryFilePath, tfile.getAbsolutePath()); Assert.assertTrue(tfile.exists()); Assert.assertTrue(isTestFile(tfile)); }
@Override public File rasterizeToTemporaryFile(String content, int width, int height) throws IOException { String fileName = getTemporaryFileName(content, width, height); TemporaryResourceReference reference = new TemporaryResourceReference(TEMP_DIR_NAME, fileName, null); File out = this.temporaryResourceStore.getTemporaryFile(reference); if (rasterizeToFile(content, out, width, height)) { return out; } return null; }
BatikSVGRasterizer implements SVGRasterizer { @Override public File rasterizeToTemporaryFile(String content, int width, int height) throws IOException { String fileName = getTemporaryFileName(content, width, height); TemporaryResourceReference reference = new TemporaryResourceReference(TEMP_DIR_NAME, fileName, null); File out = this.temporaryResourceStore.getTemporaryFile(reference); if (rasterizeToFile(content, out, width, height)) { return out; } return null; } }
BatikSVGRasterizer implements SVGRasterizer { @Override public File rasterizeToTemporaryFile(String content, int width, int height) throws IOException { String fileName = getTemporaryFileName(content, width, height); TemporaryResourceReference reference = new TemporaryResourceReference(TEMP_DIR_NAME, fileName, null); File out = this.temporaryResourceStore.getTemporaryFile(reference); if (rasterizeToFile(content, out, width, height)) { return out; } return null; }  }
BatikSVGRasterizer implements SVGRasterizer { @Override public File rasterizeToTemporaryFile(String content, int width, int height) throws IOException { String fileName = getTemporaryFileName(content, width, height); TemporaryResourceReference reference = new TemporaryResourceReference(TEMP_DIR_NAME, fileName, null); File out = this.temporaryResourceStore.getTemporaryFile(reference); if (rasterizeToFile(content, out, width, height)) { return out; } return null; }  @Override File rasterizeToTemporaryFile(String content, int width, int height); @Override TemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height); @Override TemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height,
        DocumentReference targetContext); @Override void rasterizeToResponse(String content, int width, int height); }
BatikSVGRasterizer implements SVGRasterizer { @Override public File rasterizeToTemporaryFile(String content, int width, int height) throws IOException { String fileName = getTemporaryFileName(content, width, height); TemporaryResourceReference reference = new TemporaryResourceReference(TEMP_DIR_NAME, fileName, null); File out = this.temporaryResourceStore.getTemporaryFile(reference); if (rasterizeToFile(content, out, width, height)) { return out; } return null; }  @Override File rasterizeToTemporaryFile(String content, int width, int height); @Override TemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height); @Override TemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height,
        DocumentReference targetContext); @Override void rasterizeToResponse(String content, int width, int height);  }