Reads GIF image from stream @param BufferedInputStream containing GIF file. @return int read status code
(BufferedInputStream is)
| 187 | * @return int read status code |
| 188 | */ |
| 189 | public int read(BufferedInputStream is) { |
| 190 | init(); |
| 191 | if (is != null) { |
| 192 | in = is; |
| 193 | readHeader(); |
| 194 | if (!err()) { |
| 195 | readContents(); |
| 196 | if (frameCount < 0) |
| 197 | status = STATUS_FORMAT_ERROR; |
| 198 | } |
| 199 | } else { |
| 200 | status = STATUS_OPEN_ERROR; |
| 201 | } |
| 202 | try { |
| 203 | is.close(); |
| 204 | } catch (IOException e) {} |
| 205 | return status; |
| 206 | } |
| 207 | |
| 208 | |
| 209 | /** |
no test coverage detected