public void readData(){
		//empty lists for packets and nodes
		packets = new ArrayList<MACPacket>();
		nodes = new ArrayList<Node>();

		DecoderView view = new DecoderView();
		
		//checks for the use of standardized protocols
		boolean protocols = view.askForProtocols();

		//get address out of dialog
		FileDialog fd = view.askForDestination();
	    String address = fd.getDirectory() + fd.getFile();	
		String line = "";
		
		//now create bytefield to read
		System.out.println("--- Starting to read shawn wiselib-data ---");
		System.out.println("Opening " + address + " ... ");
		//.. try to read the loggingfile from given address
		try{
		    BufferedReader reader = new BufferedReader(new FileReader(address));
			System.out.println(address + " found.\nReading contents ...");
			int packetCount = 1;
			//read file line by line			
			while ((line = reader.readLine()) != null) {		
				String[] tempLineString = line.split(";");
				
				
				//check length(Count of ";"+1) for Informationtype:
				
				//Length of 5 --> NodeLocation
				//1. NodeID (Address)
				//2. X-Coordinate
				//3. Y-Coordinate
				//4. Z-Coordinate (seems unused so far)
				if(tempLineString.length == 4){
					try{
						parseNodeLocation(tempLineString);
					} catch(Exception e){
						System.out.println("Node Location has bad format.");
					}
				}
				
				//Length of 10 --> LoggedPacket
				//1. NodeID (Logging Node Address)
				//2. Time in Seconds
				//3. Time in Milliseconds
				//4. Time in Microseconds
				//5. Source
				//6. Destination
				//7. Link Metric
				//8. Size of Payload
				//9. Payload
				else if(tempLineString.length == 9){
					try{
						parsePacket(tempLineString, protocols);
						System.out.println("Packet #"+packetCount+" is read.");
					} catch(Exception e){
						System.out.println("Corrupt protocol information in packet #"+packetCount+". Trying to parse only MAC.");
						try{
							parsePacket(tempLineString, false);
							System.out.println("Packet #"+packetCount+" is read.");
						} catch(Exception e2){
							System.out.println("Packet #"+packetCount+" has bad format and is not read.");
						}
					}
					packetCount ++;
				}
				//otherwise ---> Error
				else {
					System.out.println("Corrupt line, wrong fieldcount. Continue with next line.");
				}
			}
			System.out.println(packets.size()+" packets successfully read and saved.");
			fd.dispose();
		} catch(Exception e) {
			System.out.println("Could not open File: " + e);
			System.exit(1);
		}
	}