}
public void storeVetPhoto(DataHandler dataHandler, Integer id) throws PetClinicException, PictureException {
String contentType = dataHandler.getContentType().toLowerCase();
if (!contentType.startsWith("image/jpg") && !(contentType.startsWith("image/jpeg"))) {
throw new PictureException("Only JPEG images are accepted.");
}
try {
InputStream stream = dataHandler.getInputStream();
ByteArrayOutputStream out = new ByteArrayOutputStream();