Package org.helidb.io

Examples of org.helidb.io.NotEnoughDataException


    try
    {
      int noRead = is.read(larr);
      if (noRead != DATA_SIZE)
      {
        throw new NotEnoughDataException(DATA_SIZE, noRead);
      }
    }
    catch (IOException e)
    {
      throw new WrappedIOException(e);
View Full Code Here


  {
    byte[] larr = new byte[DATA_SIZE];
    int noRead = ra.read(larr);
    if (noRead != DATA_SIZE)
    {
      throw new NotEnoughDataException(DATA_SIZE, noRead);
    }
    return interpret(larr);
  }
View Full Code Here

    try
    {
      int noRead = is.read(larr);
      if (noRead != DATA_SIZE)
      {
        throw new NotEnoughDataException(DATA_SIZE, noRead);
      }
    }
    catch (IOException e)
    {
      throw new WrappedIOException(e);
View Full Code Here

  {
    byte[] larr = new byte[DATA_SIZE];
    int noRead = ra.read(larr);
    if (noRead != DATA_SIZE)
    {
      throw new NotEnoughDataException(DATA_SIZE, noRead);
    }
    return interpret(larr);
  }
View Full Code Here

    try
    {
      int noRead = is.read(larr);
      if (noRead != DATA_SIZE)
      {
        throw new NotEnoughDataException(DATA_SIZE, noRead);
      }
    }
    catch (IOException e)
    {
      throw new WrappedIOException(e);
View Full Code Here

    {
      m_dbFile.seek(curPos);
      long noSkipped = m_dbFile.skipBytes(m_keySize);
      if (noSkipped != m_keySize)
      {
        throw new NotEnoughDataException(m_keySize, noSkipped, curPos);
      }
      res.add(m_valueSerializer.read(m_dbFile, m_valueSize));
      curPos += m_recordSize;
    }
    return Collections.unmodifiableCollection(res);
View Full Code Here

    {
      m_dbFile.seek(curPos);
      int noRead = m_dbFile.read(kbarr);
      if (noRead != m_keySize)
      {
        throw new NotEnoughDataException(m_keySize, noRead);
      }
      if (Arrays.equals(wanted, kbarr))
      {
        return curPos;
      }
View Full Code Here

      byte[] movedKarr = new byte[m_keySize];
      byte[] movedVarr = new byte[m_valueSize];
      int noRead = m_dbFile.read(movedKarr);
      if (noRead != m_keySize)
      {
        throw new NotEnoughDataException(m_keySize, noRead);
      }
      noRead = m_dbFile.read(movedVarr);
      if (noRead != m_valueSize)
      {
        throw new NotEnoughDataException(m_valueSize, noRead);
      }
      m_dbFile.seek(pos);
      m_dbFile.write(movedKarr);
      m_dbFile.write(movedVarr);
      if (hasRecordMoveListeners())
View Full Code Here

    protected V readData()
    {
      long noSkipped = m_dbFile.skipBytes(m_keySize);
      if (noSkipped != m_keySize)
      {
        throw new NotEnoughDataException(m_keySize, noSkipped);
      }
      return m_valueSerializer.read(m_dbFile, m_valueSize);
    }
View Full Code Here

TOP

Related Classes of org.helidb.io.NotEnoughDataException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.