protected Header getHeader(final TreePath treePath) {

		if (!((HeaderTreeNode) treePath.getLastPathComponent()).isLeaf()) {
			return Header.ZERO;
		}

		for(final String headerName : headersMap.keySet()) {
			
			final Prototype proto = headersMap.get(headerName);
			
			final int catLength = proto.getNoOfCategories();
			
			final String[] categories = new String[catLength];
			proto.getCategories().toArray(categories);

			final Object[] path = treePath.getPath();
			int success = path.length - 1;
			
			for (int i = 0; i < path.length; i++) {
				try {
					
					if(path[i + 1].toString().equalsIgnoreCase(categories[i])) {
						success--;
					} else {
						i = 32;
					}
					
				} catch (final ArrayIndexOutOfBoundsException exp) {
					i = 32;
				}
			}
			// We have found the header we were looking for
			if(success == 0) {
				final int noOfFields = proto.size();
				
				final String[] output = new String[noOfFields];
				proto.getPayloads().toArray(output);
				
				final StringBuffer myBuffer = new StringBuffer();
				for(final String payload : output) {
					myBuffer.append(payload);
					myBuffer.append('\n');
				}
				myBuffer.append('\n');
				
				final String commentL = proto.getComment();
				
				return new Header(noOfFields, myBuffer.toString(), commentL);
				
			}
			
		}
		
		return Header.ZERO;
		
	}