< prev index next >

src/java.desktop/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java

Print this page




1000                 int len = length[c];
1001                 for (int i = len - 1; i >= 0; i--) {
1002                     string[i] = suffix[c];
1003                     c = prefix[c];
1004                 }
1005 
1006                 outputPixels(string, len);
1007                 oldCode = code;
1008             }
1009 
1010             processReadAborted();
1011             return theImage;
1012         } catch (IOException e) {
1013             e.printStackTrace();
1014             throw new IIOException("I/O error reading image!", e);
1015         }
1016     }
1017 
1018     /**
1019      * Remove all settings including global settings such as
1020      * <code>Locale</code>s and listeners, as well as stream settings.
1021      */
1022     public void reset() {
1023         super.reset();
1024         resetStreamSettings();
1025     }
1026 
1027     /**
1028      * Remove local settings based on parsing of a stream.
1029      */
1030     private void resetStreamSettings() {
1031         gotHeader = false;
1032         streamMetadata = null;
1033         currIndex = -1;
1034         imageMetadata = null;
1035         imageStartPosition = new ArrayList<>();
1036         numImages = -1;
1037 
1038         // No need to reinitialize 'block'
1039         blockLength = 0;
1040         bitPos = 0;




1000                 int len = length[c];
1001                 for (int i = len - 1; i >= 0; i--) {
1002                     string[i] = suffix[c];
1003                     c = prefix[c];
1004                 }
1005 
1006                 outputPixels(string, len);
1007                 oldCode = code;
1008             }
1009 
1010             processReadAborted();
1011             return theImage;
1012         } catch (IOException e) {
1013             e.printStackTrace();
1014             throw new IIOException("I/O error reading image!", e);
1015         }
1016     }
1017 
1018     /**
1019      * Remove all settings including global settings such as
1020      * {@code Locale}s and listeners, as well as stream settings.
1021      */
1022     public void reset() {
1023         super.reset();
1024         resetStreamSettings();
1025     }
1026 
1027     /**
1028      * Remove local settings based on parsing of a stream.
1029      */
1030     private void resetStreamSettings() {
1031         gotHeader = false;
1032         streamMetadata = null;
1033         currIndex = -1;
1034         imageMetadata = null;
1035         imageStartPosition = new ArrayList<>();
1036         numImages = -1;
1037 
1038         // No need to reinitialize 'block'
1039         blockLength = 0;
1040         bitPos = 0;


< prev index next >