code: public byte[] readFrame( DataInputStream in ) {
  		try {
  			if( findMarker(in,SOI) && in.available() > 0 ) {
  				return readJpegData(in, EOI);
  			}
  		} catch (IOException e) {}
  		return null;
  	}
docs: Read a single frame at a time