Do not close the input stream here but in the **finally** block.