/** * Check whether the cache is empty. * * @return true if it is empty */ public boolean isEmpty() { return size() == 0; }
private void clearCache(ByteBuffer src, long position) { if (cache.size() > 0) { int len = src.remaining(); long p = getCachePos(position); while (len > 0) { cache.remove(p); p += CACHE_BLOCK_SIZE; len -= CACHE_BLOCK_SIZE; } } }
/** * Check whether the cache is empty. * * @return true if it is empty */ public boolean isEmpty() { return size() == 0; }
/** * Check whether the cache is empty. * * @return true if it is empty */ public boolean isEmpty() { return size() == 0; }
/** * Check whether the cache is empty. * * @return true if it is empty */ public boolean isEmpty() { return size() == 0; }
private void clearCache(ByteBuffer src, long position) { if (cache.size() > 0) { int len = src.remaining(); long p = getCachePos(position); while (len > 0) { cache.remove(p); p += CACHE_BLOCK_SIZE; len -= CACHE_BLOCK_SIZE; } } }
private void clearCache(ByteBuffer src, long position) { if (cache.size() > 0) { int len = src.remaining(); long p = getCachePos(position); while (len > 0) { cache.remove(p); p += CACHE_BLOCK_SIZE; len -= CACHE_BLOCK_SIZE; } } }
private void clearCache(ByteBuffer src, long position) { if (cache.size() > 0) { int len = src.remaining(); long p = getCachePos(position); while (len > 0) { cache.remove(p); p += CACHE_BLOCK_SIZE; len -= CACHE_BLOCK_SIZE; } } }