code: public ContentInfo findMatch(InputStream inputStream) throws IOException {
  		byte[] bytes = new byte[fileReadSize];
  		int numRead = inputStream.read(bytes);
  		if (numRead < 0) {
  			return null;
  		}
  		if (numRead < bytes.length) {
  			// move the bytes into a smaller array
  			bytes = Arrays.copyOf(bytes, numRead);
  		}
  		return findMatch(bytes);
  	}
docs: Return the content type for the input-stream or null if none of the magic entries matched. You might want to use
  the {@link ContentInfoInputStreamWrapper} class to delegate to an input-stream and determine content information
  at the same time.
  
  <p>
  <b>NOTE:</b> The caller is responsible for closing the input-stream.
  </p>
  
  @throws IOException
  If there was a problem reading from the input-stream.
  @see ContentInfoInputStreamWrapper