/** {@inheritDoc} */ @Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(); }
/** * Create a large object exception, naming the object that is too big. * * @param id * identity of the object that is too big to be loaded as a byte * array in this JVM. */ public LargeObjectException(AnyObjectId id) { setObjectId(id); }
/** * Get the hex encoded name of the object, or 'unknown object' * * @return either the hex encoded name of the object, or 'unknown object' */ protected String getObjectName() { if (getObjectId() != null) return getObjectId().name(); return JGitText.get().unknownObject; }
@Override public byte[] getCachedBytes() throws LargeObjectException { try { throw new LargeObjectException(getObjectId()); } catch (IOException cannotObtainId) { LargeObjectException err = new LargeObjectException(); err.initCause(cannotObtainId); throw err; } }
/** {@inheritDoc} */ @Override public String getMessage() { return MessageFormat.format(JGitText.get().largeObjectException, getObjectName()); }
/** * Create a large object exception, where the object isn't known. * * @param cause * the cause * @since 4.10 */ public LargeObjectException(Throwable cause) { initCause(cause); }
@Override public String getMessage() { return MessageFormat.format(JGitText.get().largeObjectException, getObjectName()); }
/** * Create a large object exception, where the object isn't known. * * @param cause * the cause * @since 4.10 */ public LargeObjectException(Throwable cause) { initCause(cause); }
@Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(); } };
byte[] getCachedBytes(RevObject obj, ObjectLoader ldr) throws LargeObjectException, MissingObjectException, IOException { try { return ldr.getCachedBytes(5 * MB); } catch (LargeObjectException tooBig) { tooBig.setObjectId(obj); throw tooBig; } }
/** @return either the hex encoded name of the object, or 'unknown object'. */ protected String getObjectName() { if (getObjectId() != null) return getObjectId().name(); return JGitText.get().unknownObject; }
/** {@inheritDoc} */ @Override public String getMessage() { return MessageFormat.format(JGitText.get().largeObjectException, getObjectName()); }
@Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(id); }
/** * Create a large object exception, naming the object that is too big. * * @param id * identity of the object that is too big to be loaded as a byte * array in this JVM. */ public LargeObjectException(AnyObjectId id) { setObjectId(id); }
/** * Get the hex encoded name of the object, or 'unknown object' * * @return either the hex encoded name of the object, or 'unknown object' */ protected String getObjectName() { if (getObjectId() != null) return getObjectId().name(); return JGitText.get().unknownObject; }
/** {@inheritDoc} */ @Override public byte[] getCachedBytes() throws LargeObjectException { try { throw new LargeObjectException(getObjectId()); } catch (IOException cannotObtainId) { throw new LargeObjectException(cannotObtainId); } }
/** * Create a large object exception, naming the object that is too big. * * @param id * identity of the object that is too big to be loaded as a byte * array in this JVM. */ public LargeObjectException(AnyObjectId id) { setObjectId(id); }
@Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(); } };
byte[] getCachedBytes(RevObject obj, ObjectLoader ldr) throws LargeObjectException, MissingObjectException, IOException { try { return ldr.getCachedBytes(5 * MB); } catch (LargeObjectException tooBig) { tooBig.setObjectId(obj); throw tooBig; } }
@Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(); }