How to read the raw data from TYPE_BYTE_BINARY BufferedImage

Hi all, I want to read the data from a binary image, which is readed by BufferedImage. I want to read the data into a matrix. Do
int array[] = raster.getPiexls(0,0,w,h,array) can read the binary data out?