Similar error handling. At this point, I'd consider making a function like the one I have in SafeInputStream that abstracts away the common error handling, and just handle any special cases in each function specially.