Ejemplo n.º 1
0
 private long getPos() throws IOException {
   if (reader != null) {
     return readBytes + reader.getReadBytes();
   } else {
     return readBytes;
   }
 }
Ejemplo n.º 2
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;
     }
   }
 }