public synchronized String getRawData() throws IOException {
        byte[] input; //temporary holder

        if (m_connected) {
            m_os.write('G'); //request Data
            System.out.println("Requested Data");

            if (m_is.available() <= bufferSize) {
                input = new byte[m_is.available()]; //storage space sized to fit!
                m_receivedData = new byte[m_is.available()]; //using stream to simply null detection
                m_is.read(input); //Read in data from Pi
                for (int i = 0; (input != null) && (i < input.length); i++) {
                    m_receivedData[i] = input[i]; //transfer input to full size storage
                }
            } else {
                System.out.println("PI OVERFLOW");
                m_is.skip(m_is.available()); //reset if more is stored than buffer
                return null;
            }

            m_rawData = ""; //String to transfer received data to
            System.out.println("Raw Data: " + m_receivedData.length);
            for (int i = 0; i < m_receivedData.length; i++) {
                m_rawData += (char) m_receivedData[i]; //Cast bytes to chars and concatinate them to the String
            }
            System.out.println(m_rawData);
            return m_rawData;
        } else {
            connect();
            return null;
        }
    }