code: private int getMagicNumber(InputStream in)
  	throws IOException {
  
  
  		int t = in.read();
  		if (t < 0) throw new EOFException("Failed to read magic number");
  		int magic = (t & 0xff) << 8;
  		t = in.read();
  		if (t < 0) throw new EOFException("Failed to read magic number");
  		magic += t & 0xff;
  
  		return magic;
  	}
docs: open the file and read the magic number from the beginning
  this is used to determine the compression type
  
  @param in an input stream to read from
  @return the magic number
  @throws IOException