private boolean handleFile() throws FileLockException, IOException {
        String filename = null;
        // if we open the first file
        if (readBuffer == null) {
            filename = gp.DATABASE_DIRECTORY + "/" + hashFunction.getFilename(actualBucketId);
            actualFile = new HeaderIndexFile<Data>(filename, 1, gp);
            readBuffer = ByteBuffer.allocate((int) actualFile.getChunkSize());
            readBuffer.clear();
            readBuffer.limit(0);
        } else if (readBuffer.remaining() == 0 && actualFileOffset >= actualFile.getFilledUpFromContentStart()) {
            actualFile.close();
            actualBucketId++;
            if (actualBucketId >= numberOfBuckets) {
                return false;
            }
            filename = gp.DATABASE_DIRECTORY + "/" + hashFunction.getFilename(actualBucketId);
            actualFile = new HeaderIndexFile<Data>(filename, 1, gp);
            actualFileOffset = 0;
            readBuffer.clear();
            readBuffer.limit(0);
        }
        return true;
    }
private boolean handleFile ( ) throws FileLockException , IOException { String filename = null ; if ( readBuffer == null ) { filename = gp . DATABASE_DIRECTORY + "/" + hashFunction . getFilename ( actualBucketId ) ; actualFile = new HeaderIndexFile < Data > ( filename , 1 , gp ) ; readBuffer = ByteBuffer . allocate ( ( int ) actualFile . getChunkSize ( ) ) ; readBuffer . clear ( ) ; readBuffer . limit ( 0 ) ; } else if ( readBuffer . remaining ( ) == 0 && actualFileOffset >= actualFile . getFilledUpFromContentStart ( ) ) { actualFile . close ( ) ; actualBucketId ++ ; if ( actualBucketId >= numberOfBuckets ) { return false ; } filename = gp . DATABASE_DIRECTORY + "/" + hashFunction . getFilename ( actualBucketId ) ; actualFile = new HeaderIndexFile < Data > ( filename , 1 , gp ) ; actualFileOffset = 0 ; readBuffer . clear ( ) ; readBuffer . limit ( 0 ) ; } return true ; }
@return true, if a file was set
@throws FileLockException
@throws IOException