()
| 158 | } |
| 159 | |
| 160 | @Override |
| 161 | public void close() throws IOException { |
| 162 | if (response == null || closed) { |
| 163 | // multiple calls to close is OK |
| 164 | return; |
| 165 | } |
| 166 | flush(); |
| 167 | if (out != null) { |
| 168 | out.close(); |
| 169 | } |
| 170 | out = null; |
| 171 | closed = true; |
| 172 | } |
| 173 | |
| 174 | @Override |
| 175 | public int getRemaining() { |