public int read(final byte[] data){
  init();
  if (data != null) {
    rawData=ByteBuffer.wrap(data);
    rawData.rewind();
    rawData.order(ByteOrder.LITTLE_ENDIAN);
    readHeader();
    if (!err()) {
      readContents();
      if (frameCount < 0) {
        status=STATUS_FORMAT_ERROR;
      }
    }
  }
 else {
    status=STATUS_OPEN_ERROR;
  }
  return status;
}

public int read ( final byte [ ] data ) { init ( ) ; if ( data != null ) { rawData = ByteBuffer . wrap ( data ) ; rawData . rewind ( ) ; rawData . order ( ByteOrder . LITTLE_ENDIAN ) ; readHeader ( ) ; if ( ! err ( ) ) { readContents ( ) ; if ( frameCount < 0 ) { status = STATUS_FORMAT_ERROR ; } } } else { status = STATUS_OPEN_ERROR ; } return status ; }
reads gif image from byte array
