Package com.mchange.io
Interface IOByteArrayMap
-
- All Known Subinterfaces:
ByteArrayMap,IOSequentialByteArrayMap
public interface IOByteArrayMapA map of byte[] to byte[] that may be disk or network bound. This interface is not intended to be expressed by implementations supporting duplicate keys.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsKey(byte[] key)Returns true iff key is present.byte[]get(byte[] key)Gets the byte array associated with key, or none if this key is not present.IOByteArrayEnumerationkeys()Returns a list of all keys in the hash, provided no inserts or deletes are made while the Enumeration is untraversed.voidput(byte[] key, byte[] value)Associates the byte[] key with the byte[] value in the hash.booleanputNoReplace(byte[] key, byte[] value)Associates the byte[] key with the byte[] value in the hash.booleanremove(byte[] key)Removes the key, value pair whose key is the argument.
-
-
-
Method Detail
-
get
byte[] get(byte[] key) throws java.io.IOExceptionGets the byte array associated with key, or none if this key is not present.- Throws:
java.io.IOException
-
put
void put(byte[] key, byte[] value) throws java.io.IOExceptionAssociates the byte[] key with the byte[] value in the hash. If key is already present in the map, the old value associated with it is replaced by value.- Throws:
java.io.IOException
-
putNoReplace
boolean putNoReplace(byte[] key, byte[] value) throws java.io.IOExceptionAssociates the byte[] key with the byte[] value in the hash. Fails (and returns false) if key is already present in the map.- Throws:
java.io.IOException
-
remove
boolean remove(byte[] key) throws java.io.IOExceptionRemoves the key, value pair whose key is the argument.- Throws:
java.io.IOException
-
containsKey
boolean containsKey(byte[] key) throws java.io.IOExceptionReturns true iff key is present.- Throws:
java.io.IOException
-
keys
IOByteArrayEnumeration keys() throws java.io.IOException
Returns a list of all keys in the hash, provided no inserts or deletes are made while the Enumeration is untraversed. If inserts or deletes are made. the behavior is undefined.- Throws:
java.io.IOException
-
-