long totalTemplateLength() {
   if (mTemplateReader == null) {
     return -1;
   } else {
     return mTemplateReader.totalLength();
   }
 }