public static ProtocolFileData getFileDataInBinary(byte[] fileInBytes,
			int length) throws TagFormatException {

		byte[] subStart = Arrays.copyOfRange(fileInBytes, 0, 11);
		byte[] subEnd = Arrays.copyOfRange(fileInBytes, length - 12, length);
		byte[] endOfTransfers = Arrays.copyOfRange(fileInBytes, 0, 16);

		byte[] content;
		boolean isEnd = false;
		if (Arrays.equals(endOfTransfers, endOfTransfer)) {
			isEnd = true;
			content = null;
		} else if (Arrays.equals(subStart, fileDataStart)
				&& Arrays.equals(subEnd, fileDataEnd)) {
			content = Arrays.copyOfRange(fileInBytes, 11, length - 12);
			isEnd = false;
		} else {
			TagFormatException tfe = new TagFormatException(
					"It's not a acknowledgement file protocol");
			throw tfe;
		}
		return new ProtocolFileData(content, isEnd);
	}