Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.LargeObjectException$OutOfMemory


          return true;
        }

        @Override
        public byte[] getCachedBytes() throws LargeObjectException {
          throw new LargeObjectException();
        }
      };
    }
View Full Code Here


          public long getSize() {
            return loader.getSize();
          }

          public byte[] getCachedBytes() throws LargeObjectException {
            throw new LargeObjectException();
          }
        };
      }

    };
View Full Code Here

    return true;
  }

  @Override
  public byte[] getCachedBytes() throws LargeObjectException {
    throw new LargeObjectException();
  }
View Full Code Here

  }

  @Override
  public byte[] getCachedBytes() throws LargeObjectException {
    try {
      throw new LargeObjectException(getObjectId());
    } catch (IOException cannotObtainId) {
      LargeObjectException err = new LargeObjectException();
      err.initCause(cannotObtainId);
      throw err;
    }
  }
View Full Code Here

      return true;
    }

    @Override
    public byte[] getCachedBytes() throws LargeObjectException {
      throw new LargeObjectException(id);
    }
View Full Code Here

      // At this point there is at least one delta to apply to data.
      // (Whole objects with no deltas to apply return early above.)

      if (data == null)
        throw new LargeObjectException();

      do {
        // Cache only the base immediately before desired object.
        if (cached)
          cached = false;
        else if (delta.next == null)
          ctx.getDeltaBaseCache().put(key, delta.basePos, type, data);

        pos = delta.deltaPos;

        byte[] cmds = decompress(pos + delta.hdrLen, delta.deltaSize, ctx);
        if (cmds == null) {
          data = null; // Discard base in case of OutOfMemoryError
          throw new LargeObjectException();
        }

        final long sz = BinaryDelta.getResultSize(cmds);
        if (Integer.MAX_VALUE <= sz)
          throw new LargeObjectException.ExceedsByteArrayLimit();
View Full Code Here

      IOException {
    final byte[] act = getRng().nextBytes(512);
    final ObjectLoader ldr = new ObjectLoader() {
      @Override
      public byte[] getCachedBytes() throws LargeObjectException {
        throw new LargeObjectException();
      }

      @Override
      public long getSize() {
        return act.length;
View Full Code Here

        return true;
      }

      @Override
      public byte[] getCachedBytes() throws LargeObjectException {
        throw new LargeObjectException();
      }

      @Override
      public long getSize() {
        return Long.MAX_VALUE;
View Full Code Here

          return true;
        }

        @Override
        public byte[] getCachedBytes() throws LargeObjectException {
          throw new LargeObjectException();
        }
      };
    }
View Full Code Here

      if (sz < bigFileThreshold && sz < Integer.MAX_VALUE) {
        byte[] buf;
        try {
          buf = new byte[(int) sz];
        } catch (OutOfMemoryError noMemory) {
          LargeObjectException e;

          e = new LargeObjectException(id.toObjectId());
          e.initCause(noMemory);
          throw e;
        }
        InputStream in = ldr.openStream();
        try {
          IO.readFully(in, buf, 0, buf.length);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.errors.LargeObjectException$OutOfMemory

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.