12501251125212531254125512561257
@Override public long getLength(String blobId) throws MicroKernelException { try { return blobStore.getBlobLength(blobId); } catch (Exception e) { throw new MicroKernelException(e); } }
12601261126212631264126512661267
public int read(String blobId, long pos, byte[] buff, int off, int length) throws MicroKernelException { try { return blobStore.readBlob(blobId, pos, buff, off, length); } catch (Exception e) { throw new MicroKernelException(e); } }
12691270127112721273127412751276
@Override public String write(InputStream in) throws MicroKernelException { try { return blobStore.writeBlob(in); } catch (Exception e) { throw new MicroKernelException(e); } }
13201321132213231324132513261327132813291330
unsaved.put(path, prev); String msg = String.format("Attempt to update " + "unsavedLastRevision for %s with %s, which is " + "older than current %s.", path, rev, prev); throw new MicroKernelException(msg); } } } else { // the document was updated: // we no longer need to update it in a background process
315316317318319320321
private static RuntimeException convert(Exception e) { if (e instanceof RuntimeException) { return (RuntimeException) e; } return new MicroKernelException("Unexpected exception: " + e.toString(), e); }
281282283284285286287
private static RuntimeException convert(Exception e) { if (e instanceof RuntimeException) { return (RuntimeException) e; } log("// unexpected exception type: " + e.getClass().getName()); return new MicroKernelException("Unexpected exception: " + e.toString(), e); }
286287288289290291292
334335336337338339340341
return MISSING_NODE; } try { return cache.get(revision + childPath); } catch (ExecutionException e) { throw new MicroKernelException(e); } }
102103104105106107108109110111
try { request = createRequest("getHeadRevision"); return request.getString(); } catch (IOException e) { throw new MicroKernelException(e); } finally { IOUtils.closeQuietly(request); } }
119120121122123124125126
return request.getString(); } finally { request.close(); } } catch (IOException e) { throw new MicroKernelException(e); } }