Long hash(Path file) throws IOException
	{
		if (NOHASH_FILES.contains(getFileEnding(file)))
		{
			return Files.size(file);
		}

		InputStream inputStream = null;
		try
		{
			inputStream = Files.newInputStream(file);
			byte[] currentChunk = new byte[8192];
			while (inputStream.read(currentChunk) > -1)
			{
				adler.update(currentChunk, 0, currentChunk.length);
			}
			long value = adler.getValue();
			adler.reset();
			return value;
		} catch (IOException ex)
		{
			Logger.getLogger(DirectorySyncer.class.getName()).log(Level.SEVERE, null, ex);
			return null;
		} finally
		{
			try
			{
				inputStream.close();
			} catch (IOException e)
			{
				e.printStackTrace();
			}
		}
	}