Similar to close(), but is allowed to be called from this thread.
()
| 59 | * Similar to close(), but is allowed to be called from this thread. |
| 60 | */ |
| 61 | private void closeInternal() { |
| 62 | InputStream is2 = is; |
| 63 | if (is2 == null) |
| 64 | return; |
| 65 | |
| 66 | is = null; |
| 67 | listener = null; |
| 68 | |
| 69 | try { |
| 70 | is2.close(); |
| 71 | } catch (IOException e) { |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void close() { |
| 76 | closeInternal(); |