コード例 #1
0
ファイル: GifDecoder.java プロジェクト: gigiigig/Java-Chat
 /**
  * Reads GIF image from stream
  *
  * @param BufferedInputStream containing GIF file.
  * @return read status code (0 = no errors)
  */
 public int read(BufferedInputStream is) {
   init();
   if (is != null) {
     in = is;
     readHeader();
     if (!err()) {
       readContents();
       if (frameCount < 0) {
         status = STATUS_FORMAT_ERROR;
       }
     }
   } else {
     status = STATUS_OPEN_ERROR;
   }
   try {
     is.close();
   } catch (IOException e) {
   }
   return status;
 }