public void process(String tweet) throws IOException {

        JSONParser jsonParser = new JSONParser();

        String tweetText = null;
        String tweetTimestamp = null;
        String tweetId = null;
        String tweetUserId = null;
        String tweetInReplyToStatusId = null;

        try {

            JSONObject tweetJO = (JSONObject) jsonParser.parse(tweet);
            JSONObject tweetDataJO = (JSONObject) jsonParser.parse((String) tweetJO.get("Data"));

            tweetId = (String) tweetDataJO.get("IdStr");
            tweetTimestamp = (String) tweetDataJO.get("CreatedAt");
            tweetInReplyToStatusId = (String) tweetDataJO.get("InReplyToStatusIdStr");
            tweetText = ((String) tweetDataJO.get("Text"));
            tweetUserId = (String) ((JSONObject)tweetDataJO.get("User")).get("IdStr");

            if(tweetText == null) {

                nullWriter.write("$" + tweetId + "\n");
                nullWriter.write("$" + tweetTimestamp + "\n");
                nullWriter.write("$" + tweetText + "\n");
                nullWriter.write("$" + tweetUserId + "\n");
                nullWriter.write("$" + tweetInReplyToStatusId + "\n");
                nullWriter.write("$\n");
                return;
            }

            tweetText = tweetText.replaceAll("[\\n\\r\\t]" , " ");

            fileWriter.write("$" + tweetId + "\n");
            fileWriter.write("$" + tweetTimestamp + "\n");
            fileWriter.write("$" + tweetText + "\n");
            fileWriter.write("$" + tweetUserId + "\n");
            fileWriter.write("$" + tweetInReplyToStatusId + "\n");
            fileWriter.write("$\n");

        }
        catch (ParseException e) {
            e.printStackTrace();
        }

    }