code: @Override
      public ITagReader getReader() throws IOException {
          FLVReader reader = null;
          IoBuffer fileData;
          String fileName = file.getName();
          // if no cache is set an NPE will be thrown
          if (cache == null) {
              log.info("FLV cache is null, forcing NoCacheImpl instance");
              cache = NoCacheImpl.getInstance();
          }
          ICacheable ic = cache.get(fileName);
          // look in the cache before reading the file from the disk
          if (null == ic || (null == ic.getByteBuffer())) {
              if (file.exists()) {
                  log.debug("File size: {}", file.length());
                  reader = new FLVReader(file, generateMetadata);
                  // get a ref to the mapped byte buffer
                  fileData = reader.getFileData();
                  // offer the uncached file to the cache
                  if (fileData != null && cache.offer(fileName, fileData)) {
                      log.debug("Item accepted by the cache: {}", fileName);
                  } else {
                      log.debug("Item will not be cached: {}", fileName);
                  }
              } else {
                  log.info("Creating new file: {}", file);
                  file.createNewFile();
              }
          } else {
              fileData = IoBuffer.wrap(ic.getBytes());
              reader = new FLVReader(fileData, generateMetadata);
          }
          return reader;
      }
docs: {@inheritDoc}