diff options
Diffstat (limited to 'lang/java/src/com/sleepycat/db/DatabaseEntry.java')
-rw-r--r-- | lang/java/src/com/sleepycat/db/DatabaseEntry.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lang/java/src/com/sleepycat/db/DatabaseEntry.java b/lang/java/src/com/sleepycat/db/DatabaseEntry.java index 015917d6..69dfcdb6 100644 --- a/lang/java/src/com/sleepycat/db/DatabaseEntry.java +++ b/lang/java/src/com/sleepycat/db/DatabaseEntry.java @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ @@ -212,6 +212,29 @@ public class DatabaseEntry { */ /** + Configure this DatabaseEntry to be stored as a blob. + <p> + @param blob + Whether this DatabaseEntry is configured to be stored as a blob. + */ + public void setBlob(final boolean blob) { + if (blob) + flags |= DbConstants.DB_DBT_BLOB; + else + flags &= ~DbConstants.DB_DBT_BLOB; + } + + /** + Return whether this DatabaseEntry is configured to be stored as a blob. + <p> + @return + Whether this DatabaseEntry is configured to be stored as a blob. + */ + public boolean getBlob() { + return (flags & DbConstants.DB_DBT_BLOB) != 0; + } + + /** Return the byte array. <p> For a DatabaseEntry that is used as an output parameter, the byte |