All positions are 0 based @author Fred Toussi (fredt@users dot sourceforge.net) @version 1.9.0 @since 1.9.0
111112113114115116117118119120121
image = imageService.createImage(getProject().getId(), metadata); } { BlobData data = BlobData.build(file); image = imageService.uploadData(image, data); } WrappedImage result = new WrappedImage(); result.image = toModel(image.getData());
227228229230231232233234235236237238239240241
ResponseBuilder response; ImageLocation imageLocation = image.getLocation(); if (imageLocation.hasStored()) { String cookie = imageLocation.getStored(); BlobData blob = imageDataService.getImageFile(cookie); response = Response.ok().entity(blob.asEntity()); ByteString md5 = blob.getHash(); response.header("Content-MD5", Hex.toHex(md5.toByteArray())); } else { response = Response.status(Status.NO_CONTENT); }
7980818283848586878889
try (TempFile tempImage = imageClient.downloadImage(imageUri, imageMetadata)) { log.info("Creating image record"); Image image = imageService.createImage(projectId, metadata); log.info("Uploading image data"); BlobData blobData = BlobData.build(tempImage.getFile()); image = imageService.uploadData(image, blobData); return image; } }
149150151152153154155156157158159
} } } if (localCache.exists()) { BlobData is = new BlobData(localCache, key); return is; } else { return null; } }
return sis; // } } BlobData getBlob(BlobStore blobStore, ByteString key) throws IOException { final BlobData is = blobStore.find(key); if (is == null) { throw new IOException("Unable to open storage for range: " + Hex.toHex(key.toByteArray())); }
351352353354355356357358359
if (data == null) { return null; } BlobData blob = new BlobDataID(lobID); return blob; }
98898999099199299399499599699799899910001001100210031004
default : throw Error.runtimeError(ErrorCode.U_S0500, "FunctionSQL"); } BlobData string = (BlobData) data[1]; if (string.length(session) != 1) { throw Error.error(ErrorCode.X_22027); } byte[] bytes = string.getBytes(); return ((BinaryType) dataType).trim(session, (BlobData) data[3], bytes[0], leading, trailing);
411412413414415416417418419420421422423
if (inputStream == null) { blobId = resultLobId; inputStream = result.getInputStream(); } else { BlobData blob = session.createBlob(blobLength); blobId = blob.getId(); resultLobs.put(resultLobId, blobId); } countStream = new CountdownInputStream(inputStream);
481482483484485486487488489490491492
private void registerLobsForRow(Object[] data) { for (int i = 0; i < data.length; i++) { if (data[i] instanceof BlobDataID) { BlobData blob = (BlobDataID) data[i]; long id = resultLobs.get(blob.getId()); data[i] = database.lobManager.getBlob(id); } else if (data[i] instanceof ClobDataID) { ClobData clob = (ClobDataID) data[i]; long id = resultLobs.get(clob.getId());
470471472473474475476477478479480
if (data == null) { return null; } BlobData blob = new BlobDataID(lobID); return blob; } finally { writeLock.unlock(); }