70 * by dispose to avoid disposing twice.
71 */
72 private long structPointer = 0;
73
74 /** The input stream we read from */
75 private ImageInputStream iis = null;
76
77 /**
78 * List of stream positions for images, reinitialized every time
79 * a new input source is set.
80 */
81 private List imagePositions = null;
82
83 /**
84 * The number of images in the stream, or 0.
85 */
86 private int numImages = 0;
87
88 static {
89 java.security.AccessController.doPrivileged(
90 new sun.security.action.LoadLibraryAction("jpeg"));
91 initReaderIDs(ImageInputStream.class,
92 JPEGQTable.class,
93 JPEGHuffmanTable.class);
94 }
95
96 // The following warnings are converted to strings when used
97 // as keys to get localized resources from JPEGImageReaderResources
98 // and its children.
99
100 /**
101 * Warning code to be passed to warningOccurred to indicate
102 * that the EOI marker is missing from the end of the stream.
103 * This usually signals that the stream is corrupted, but
104 * everything up to the last MCU should be usable.
105 */
106 protected static final int WARNING_NO_EOI = 0;
107
108 /**
109 * Warning code to be passed to warningOccurred to indicate
110 * that a JFIF segment was encountered inside a JFXX JPEG
|
70 * by dispose to avoid disposing twice.
71 */
72 private long structPointer = 0;
73
74 /** The input stream we read from */
75 private ImageInputStream iis = null;
76
77 /**
78 * List of stream positions for images, reinitialized every time
79 * a new input source is set.
80 */
81 private List imagePositions = null;
82
83 /**
84 * The number of images in the stream, or 0.
85 */
86 private int numImages = 0;
87
88 static {
89 java.security.AccessController.doPrivileged(
90 new java.security.PrivilegedAction<Void>() {
91 public Void run() {
92 System.loadLibrary("jpeg");
93 return null;
94 }
95 });
96 initReaderIDs(ImageInputStream.class,
97 JPEGQTable.class,
98 JPEGHuffmanTable.class);
99 }
100
101 // The following warnings are converted to strings when used
102 // as keys to get localized resources from JPEGImageReaderResources
103 // and its children.
104
105 /**
106 * Warning code to be passed to warningOccurred to indicate
107 * that the EOI marker is missing from the end of the stream.
108 * This usually signals that the stream is corrupted, but
109 * everything up to the last MCU should be usable.
110 */
111 protected static final int WARNING_NO_EOI = 0;
112
113 /**
114 * Warning code to be passed to warningOccurred to indicate
115 * that a JFIF segment was encountered inside a JFXX JPEG
|