/** * Reads GIF image from stream * * @param BufferedInputStream containing GIF file. * @return int read status code */ 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; }
/** * Reads GIF image from stream * * @param BufferedInputStream containing GIF file. * @return int read status code */ 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; }