/* */ {
/* 51 */ private static String DEFAULT_FORMAT = "tiff";
/* */
/* */ public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints)
/* */ {
/* 86 */ ImagingListener listener = ImageUtil.getImagingListener(renderHints);
/* */
/* 89 */ String fileName = (String)paramBlock.getObjectParameter(0);
/* */
/* 92 */ String format = (String)paramBlock.getObjectParameter(1);
/* */
/* 97 */ if (format == null) {
/* 98 */ format = DEFAULT_FORMAT;
/* */ }
/* */
/* 102 */ ImageEncodeParam param = null;
/* 103 */ if (paramBlock.getNumParameters() > 2) {
/* 104 */ param = (ImageEncodeParam)paramBlock.getObjectParameter(2);
/* */ }
/* */
/* 108 */ OutputStream stream = null;
/* */ try {
/* 110 */ if (param == null)
/* */ {
/* 113 */ stream = new BufferedOutputStream(new FileOutputStream(fileName));
/* */ }
/* */ else
/* */ {
/* 118 */ stream = new SeekableOutputStream(new RandomAccessFile(fileName, "rw"));
/* */ }
/* */ }
/* */ catch (FileNotFoundException e)
/* */ {
/* 123 */ String message = JaiI18N.getString("FileLoadRIF0") + fileName;
/* 124 */ listener.errorOccurred(message, e, this, false);
/* */
/* 126 */ return null;
/* */ } catch (SecurityException e) {
/* 128 */ String message = JaiI18N.getString("FileStoreRIF0");
/* 129 */ listener.errorOccurred(message, e, this, false);
/* */
/* 131 */ return null;
/* */ }
/* */
/* 135 */ ParameterBlock pb = new ParameterBlock();