Code example for InvalidParameterException

0
            // a single directory. 
            // 
            // Following a git-like strategy where we partition MD5-named files based on 
            // the first 2 characters is slower across the board. 
            this.fileCount = 1024;
            this.byteCount = 1024 * 1024;
        } 
 
        int getByteCount() { 
            return byteCount;
        } 
 
        int getFileCount() { 
            return fileCount;
        } 
 
        void setByteCount(int n) {
            if (n < 0) {
                throw new InvalidParameterException("Cache byte-count limit must be >= 0");
            } 
            byteCount = n;