Top Description Methods
com.mchange.io

public Interface IOByteArrayMap

Known Direct Subinterfaces
com.mchange.io.IOSequentialByteArrayMap, com.mchange.util.ByteArrayMap
Imports
java.io.*

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 TypeMethod and Description
public boolean
containsKey(byte[] key)

Returns true iff key is present.

public byte[]
get(byte[] key)

Gets the byte array associated with key, or none if this key is not present.

public IOByteArrayEnumeration
keys()

Returns a list of all keys in the hash, provided no inserts or deletes are made while the Enumeration is untraversed.

public void
put(byte[] key, byte[] value)

Associates the byte[] key with the byte[] value in the hash.

public boolean
putNoReplace(byte[] key, byte[] value)

Associates the byte[] key with the byte[] value in the hash.

public boolean
remove(byte[] key)

Removes the key, value pair whose key is the argument.

Method Detail

containsKeyback to summary
public boolean containsKey(byte[] key) throws IOException

Returns true iff key is present.

getback to summary
public byte[] get(byte[] key) throws IOException

Gets the byte array associated with key, or none if this key is not present.

keysback to summary
public IOByteArrayEnumeration keys() throws 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.

putback to summary
public void put(byte[] key, byte[] value) throws IOException

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.

putNoReplaceback to summary
public boolean putNoReplace(byte[] key, byte[] value) throws IOException

Associates the byte[] key with the byte[] value in the hash. Fails (and returns false) if key is already present in the map.

removeback to summary
public boolean remove(byte[] key) throws IOException

Removes the key, value pair whose key is the argument.