title: Determine if a byte[] is a pdf file
body: <p>Is there any way of checking if a byte[] is a pdf without opening?</p>
  
  <p>I have some code to display a list of byte[] as pdf thumbnails. I previously knew all the byte[] were pdf's because we filtered the servlet to only return these. Now the requirement has changed and I need to bring all file types back. Is there any way of checking what the byte[] is, or more specifically determining if it isn't, a pdf?</p>