private Boolean containsKeyIntern(final ChunkCacheKey chunkCacheKey) throws IOException {
      try {
         final long length = directory.fileLength(chunkCacheKey.getFileName());
         final int bufferSize = chunkCacheKey.getBufferSize();
         final int chunkId = chunkCacheKey.getChunkId();
         return Boolean.valueOf((chunkId * bufferSize) < (length + bufferSize));
      }
      catch (NoSuchFileException nfne) {
         //Ok, we might check for file existence first.. but it's reasonable to be
         //optimistic.
         return Boolean.FALSE;
      }
   }
private Boolean containsKeyIntern ( final ChunkCacheKey chunkCacheKey ) throws IOException { try { final long length = directory . fileLength ( chunkCacheKey . getFileName ( ) ) ; final int bufferSize = chunkCacheKey . getBufferSize ( ) ; final int chunkId = chunkCacheKey . getChunkId ( ) ; return Boolean . valueOf ( ( chunkId * bufferSize ) < ( length + bufferSize ) ) ; } catch ( NoSuchFileException nfne ) { return Boolean . FALSE ; } }
ContainsKey implementation for chunk elements