アプリケーションでDatepickerを使用しています。私がやろうとしているのは、テキストフィールドにすでに設定されている日付を取得し、それをDatepickerコントロールに表示することです。しかし、使用するとNumberFormatExceptionが発生します
Integer.parseInt(splittedDate[2])  //i.e the year column. 
splittedDateのデバッグ中に表示された場合、問題のない3つの値が含まれています。しかし、最後のインデックスで年の列を解析している間、例外がスローされます。なぜそうなのか理解できません。これから私を助けてください。以下は、DatepickerのCreateDialogメソッドの実装です。
@Override
protected Dialog onCreateDialog(int id) {
    if (id == DATE_DIALOG_ID) {
        if (birthDate.getText().toString().equalsIgnoreCase(""))
            return new DatePickerDialog(this, mDateSetListener, mYear,
                    mMonth, mDay);
        else {
            String[] splittedDate = birthDate.getText().toString().split("-");
            try{
                Log.i("Month String", splittedDate[0]);
                mMonth = Integer.parseInt(splittedDate[0]);
                Log.i("Day String", splittedDate[1]);
                mDay = Integer.parseInt(splittedDate[1]);
                Log.i("Year String", splittedDate[0]);
                mYear = Integer.parseInt(splittedDate[2]);
            }
            catch(Exception e)
            {
                Log.e("Number Format Exception Message: ",e.getMessage());
            }
            return new DatePickerDialog(this, mDateSetListener, mYear,
                    mMonth, mDay);
        }
    return null;
}
logCat情報は次のとおりです。
 09-05 16:21:54.722: E/AndroidRuntime(28596): FATAL EXCEPTION: main
 09-05 16:21:54.722: E/AndroidRuntime(28596): java.lang.NumberFormatException: unable to parse '1970 ' as integer
 09-05 16:21:54.722: E/AndroidRuntime(28596):   at java.lang.Integer.parse(Integer.java:383)
 09-05 16:21:54.722: E/AndroidRuntime(28596):   at java.lang.Integer.parseInt(Integer.java:372)
 09-05 16:21:54.722: E/AndroidRuntime(28596):   at java.lang.Integer.parseInt(Integer.java:332)
 09-05 16:21:54.722: E/AndroidRuntime(28596):   at com.test.project.activity.DetailActivity.onCreateDialog(DetailActivity.java:332)