private int calculateValue(final File inputFile) {

		if (inputFile.isDirectory()) {
			return -1;
		}

		int headerLength = 0;

		BufferedReader inBuffReader = null;
		try {

			inBuffReader = new BufferedReader(new FileReader(inputFile));

			final StringBuffer one = new StringBuffer();
			int counter = 0;
			int got;
			while (((got = inBuffReader.read()) > 0) && (counter < MAX_CHARS)) {

				one.append((char) got);
				counter++;

			}
			inBuffReader.close();

			one.delete(0, one.indexOf(END_SIGNATURE) + END_SIGNATURE.length());

			headerLength = one.indexOf("\r\n\r\n");

			if (headerLength < 0) {

				headerLength = one.indexOf("\n\n");

			}

		} catch (final IOException e1) {

			return -2;

		} catch (final StringIndexOutOfBoundsException e2) {

			return -3;

		} catch (final NumberFormatException e3) {

			return -4;

		} finally {

			IOUtils.closeQuietly(inBuffReader);

		}

		return headerLength;
	}