public bool FindBucketForPrefix(string key, out xBucket bucket, out string prefix, bool keyIsPrefix)
{
bucket = null;
prefix = key;
if (!keyIsPrefix)
{
prefix = PrefixForByteCount(key, this.prefixLength);
}
object datathing = this.tree.Get(prefix, "");
if (datathing is byte[])
{
byte[] databytes = (byte[]) datathing;
bucket = new xBucket(this);
bucket.Load(databytes);
if (bucket.Count()<1)
{
throw new BplusTreeException("empty bucket loaded");
}
return true;
}
return false; // default
}