er: 1px solid #cccccc; font-size: 90%;">import tokyocabinet.*;

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

    // create the object
    HDB hdb = new HDB();

    // open the database
    if(!hdb.open("casket.tch", HDB.OWRITER | HDB.OCREAT)){
      int ecode = hdb.ecode();
      System.err.println("open error: " + hdb.errmsg(ecode));
    }

    // store records
    if(!hdb.put("foo", "hop") ||
       !hdb.put("bar", "step") ||
       !hdb.put("baz", "jump")){
      int ecode = hdb.ecod