Package com.mchange.io
Interface IOByteArrayMap
- All Known Subinterfaces:
ByteArrayMap
,IOSequentialByteArrayMap
public interface IOByteArrayMap
A 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
Modifier and TypeMethodDescriptionboolean
containsKey
(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.keys()
Returns a list of all keys in the hash, provided no inserts or deletes are made while the Enumeration is untraversed.void
put
(byte[] key, byte[] value) Associates the byte[] key with the byte[] value in the hash.boolean
putNoReplace
(byte[] key, byte[] value) Associates the byte[] key with the byte[] value in the hash.boolean
remove
(byte[] key) Removes the key, value pair whose key is the argument.
-
Method Details
-
get
Gets the byte array associated with key, or none if this key is not present.- Throws:
IOException
-
put
Associates 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:
IOException
-
putNoReplace
Associates the byte[] key with the byte[] value in the hash. Fails (and returns false) if key is already present in the map.- Throws:
IOException
-
remove
Removes the key, value pair whose key is the argument.- Throws:
IOException
-
containsKey
Returns true iff key is present.- Throws:
IOException
-
keys
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:
IOException
-