Merge "API: Make close() throw an IOException." into gingerbread