40 |
|
|
41 |
import java.awt.Dimension; |
import java.awt.Dimension; |
42 |
import java.io.IOException; |
import java.io.IOException; |
43 |
|
import java.util.ArrayList; |
44 |
import java.util.Iterator; |
import java.util.Iterator; |
45 |
import java.util.List; |
import java.util.List; |
46 |
import java.util.Locale; |
import java.util.Locale; |
60 |
protected Locale locale; |
protected Locale locale; |
61 |
protected ImageWriterSpi originatingProvider; |
protected ImageWriterSpi originatingProvider; |
62 |
protected Object output; |
protected Object output; |
63 |
protected List progressListeners; |
protected List progressListeners = new ArrayList(); |
64 |
protected List warningListeners; |
protected List warningListeners = new ArrayList(); |
65 |
protected List warningLocales; |
protected List warningLocales = new ArrayList(); |
66 |
|
|
67 |
protected ImageWriter(ImageWriterSpi originatingProvider) |
protected ImageWriter(ImageWriterSpi originatingProvider) |
68 |
{ |
{ |
372 |
|
|
373 |
if (originatingProvider != null) |
if (originatingProvider != null) |
374 |
types = originatingProvider.getOutputTypes(); |
types = originatingProvider.getOutputTypes(); |
375 |
|
|
376 |
if (types != null) |
if (types != null) |
377 |
for (int i = types.length - 1; i >= 0; --i) |
for (int i = types.length - 1; i >= 0; --i) |
378 |
if (types[i].equals(output.getClass())) |
if (types[i].isInstance(output)) |
379 |
found = true; |
found = true; |
380 |
|
|
381 |
if (! found) |
if (! found) |
382 |
throw new IllegalArgumentException("output type not available"); |
throw new IllegalArgumentException("output type not available"); |