Exemplo n.º 1
0
 private void closeReader() throws IOException {
   if (reader != null) {
     try {
       readBytes += reader.getReadBytes();
       reader.close();
     } catch (Exception e) {
       // not much to do here but skip the task
     } finally {
       reader = null;
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public synchronized void close() throws IOException {
   if (reader != null) {
     reader.close();
   }
 }