IIUC, EOFException means "unexpected stream termination". If it's normal process, it's not "unexpected" behavior. Therefore, I think c) is better approach.