1 /*
2 * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
35 import java.util.List;
36 import java.util.Locale;
37 import java.util.MissingResourceException;
38 import java.util.ResourceBundle;
39 import javax.imageio.event.IIOWriteWarningListener;
40 import javax.imageio.event.IIOWriteProgressListener;
41 import javax.imageio.metadata.IIOMetadata;
42 import javax.imageio.stream.ImageOutputStream;
43 import javax.imageio.spi.ImageWriterSpi;
44
45 /**
46 * An abstract superclass for encoding and writing images. This class
47 * must be subclassed by classes that write out images in the context
48 * of the Java Image I/O framework.
49 *
50 * <p> <code>ImageWriter</code> objects are normally instantiated by
51 * the service provider class for the specific format. Service
52 * provider classes are registered with the <code>IIORegistry</code>,
53 * which uses them for format recognition and presentation of
54 * available format readers and writers.
55 *
56 * <p>
57 *
58 * @see ImageReader
59 * @see ImageWriteParam
60 * @see javax.imageio.spi.IIORegistry
61 * @see javax.imageio.spi.ImageWriterSpi
62 *
63 */
64 public abstract class ImageWriter implements ImageTranscoder {
65
66 /**
67 * The <code>ImageWriterSpi</code> that instantiated this object,
68 * or <code>null</code> if its identity is not known or none
69 * exists. By default it is initialized to <code>null</code>.
70 */
71 protected ImageWriterSpi originatingProvider = null;
72
73 /**
74 * The <code>ImageOutputStream</code> or other <code>Object</code>
75 * set by <code>setOutput</code> and retrieved by
76 * <code>getOutput</code>. By default it is initialized to
|
1 /*
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
35 import java.util.List;
36 import java.util.Locale;
37 import java.util.MissingResourceException;
38 import java.util.ResourceBundle;
39 import javax.imageio.event.IIOWriteWarningListener;
40 import javax.imageio.event.IIOWriteProgressListener;
41 import javax.imageio.metadata.IIOMetadata;
42 import javax.imageio.stream.ImageOutputStream;
43 import javax.imageio.spi.ImageWriterSpi;
44
45 /**
46 * An abstract superclass for encoding and writing images. This class
47 * must be subclassed by classes that write out images in the context
48 * of the Java Image I/O framework.
49 *
50 * <p> <code>ImageWriter</code> objects are normally instantiated by
51 * the service provider class for the specific format. Service
52 * provider classes are registered with the <code>IIORegistry</code>,
53 * which uses them for format recognition and presentation of
54 * available format readers and writers.
55 *
56 * @see ImageReader
57 * @see ImageWriteParam
58 * @see javax.imageio.spi.IIORegistry
59 * @see javax.imageio.spi.ImageWriterSpi
60 *
61 */
62 public abstract class ImageWriter implements ImageTranscoder {
63
64 /**
65 * The <code>ImageWriterSpi</code> that instantiated this object,
66 * or <code>null</code> if its identity is not known or none
67 * exists. By default it is initialized to <code>null</code>.
68 */
69 protected ImageWriterSpi originatingProvider = null;
70
71 /**
72 * The <code>ImageOutputStream</code> or other <code>Object</code>
73 * set by <code>setOutput</code> and retrieved by
74 * <code>getOutput</code>. By default it is initialized to
|