When Andy Dufresne was incarcerated , who did he befriend ?
James Whitmore as Brooks Hatlen , prison librarian / trustee and one of the oldest convicts at Shawshank , having been in prison since 1905 .