
  }
}
</pre>

<p>The following code is an example to use a fixed-length database.</p>

<pre style="margin: 0em 0.8em; padding: 0.3em; background: #eeeeff none; border: 1px solid #cccccc; font-size: 90%;">import tokyocabinet.*;

public class TCFDBEX {
  public static void main(String[] args){

    // create the object
    FDB fdb = new FDB();

    // open the database
    if(!fdb.open("casket.tcf", FDB.OWRITER | FDB.OCREAT)){
      int ecode = fdb.ecode();
      System.err.println("open error: " + fdb.errms