Пример #1
0
  public byte[] loadByteArray(final int id) {
    byte[] ret = null;
    Entry e = (Entry) m_buffer.get(new Integer(id));

    if (e != null) {
      m_hits++;

      ret = new byte[e.m_data.length];
      System.arraycopy(e.m_data, 0, ret, 0, e.m_data.length);
    } else {
      ret = m_storageManager.loadByteArray(id);
      e = new Entry(ret);
      addEntry(id, e);
    }

    return ret;
  }