Package com.orientechnologies.common.io

Examples of com.orientechnologies.common.io.OIOException


  protected long checkRegions(final long iOffset, final long iLength) {
    acquireReadLock();
    try {
      if (iOffset < 0 || iOffset + iLength > getFilledUpTo())
        throw new OIOException("You cannot access outside the file size (" + getFilledUpTo()
            + " bytes). You have requested portion " + iOffset + "-" + (iOffset + iLength) + " bytes. File: " + toString());

      return iOffset;
    } finally {
      releaseReadLock();
View Full Code Here


      start = iIndex;
      final int byteRead = input.read(buffer);
      end = start + byteRead;
      current = start;
    } catch (IOException e) {
      throw new OIOException("Error in read", e);
    }
  }
View Full Code Here

  public boolean ready() {
    try {
      return current < end || input.ready();
    } catch (IOException e) {
      throw new OIOException("Error in ready", e);
    }
  }
View Full Code Here

      if (network == null) {
        lastURL = useNewServerURL(lastURL);
        if (lastURL == null) {
          parseServerURLs();
          throw new OIOException("Cannot open a connection to remote server: " + iCurrentURL);
        }
      } else if (!network.isConnected()) {
        // DISCONNECTED NETWORK, GET ANOTHER ONE
        OLogManager.instance().error(this, "Removing disconnected network channel '%s'...", lastURL);
        engine.getConnectionManager().remove(network);
View Full Code Here

    } catch (OIOException e) {
      // RE-THROW IT
      throw e;
    } catch (Exception e) {
      OLogManager.instance().debug(this, "Error on connecting to %s", e, iServerURL);
      throw new OIOException("Error on connecting to " + iServerURL, e);
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.common.io.OIOException

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.