/[classpath]/classpath/gnu/java/awt/image/ImageDecoder.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/image/ImageDecoder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by mark, Sat Jul 31 17:15:13 2004 UTC revision 1.13 by mkoch, Tue Jan 11 22:07:32 2005 UTC
# Line 74  public abstract class ImageDecoder imple Line 74  public abstract class ImageDecoder imple
74      this.url = url;      this.url = url;
75    }    }
76    
77      public ImageDecoder (InputStream is)
78      {
79        this.input = is;
80      }
81    
82    public ImageDecoder (byte[] imagedata, int imageoffset, int imagelength)    public ImageDecoder (byte[] imagedata, int imageoffset, int imagelength)
83    {    {
84      data = imagedata;      data = imagedata;
# Line 108  public abstract class ImageDecoder imple Line 113  public abstract class ImageDecoder imple
113          // ImageDecoder constructors so that exceptions cause          // ImageDecoder constructors so that exceptions cause
114          // imageComplete to be called with an appropriate error          // imageComplete to be called with an appropriate error
115          // status.          // status.
116          if (url != null)          if (input == null)
117            input = url.openStream();            {
118          else              try
119            {                {
120              if (filename != null)                  if (url != null)
121                input = new FileInputStream (filename);                    input = url.openStream();
122              else                  else
123                input = new ByteArrayInputStream (data, offset, length);                    {
124            }                      if (filename != null)
125                          input = new FileInputStream (filename);
126          produce (list, input);                      else
127                          input = new ByteArrayInputStream (data, offset, length);
128                      }
129                    produce (list, input);
130                  }
131                finally
132                  {
133                    input = null;
134                  }
135              }
136            else
137              {
138                produce (list, input);
139              }
140        }        }
141      catch (Exception e)      catch (Exception e)
142        {        {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26