I wrote Electric's BTree implementation. It does not depend on any other part of Electric, and is licensed under the LGPL so it can be used as a library in non-GPLed software.

You can download it in a “source jarfile” here (even though the file extension is .jar, it is actually a zipfile full of .java source files).

You can find the javadoc here; the features are listed here.