How to recieve hex data JPEG camera from Arduino and show image in Processing

This is my simple code to save image but i look like to read only first line and tell error . What i should to do ?