public void setChunkIsSet(boolean value) { if (!value) { free(); this.chunk = null; } }
private void freeChunk() { final BlobChunk chunk = this.currentChunk; if (chunk != null) { chunk.free(); this.currentChunk = null; } }
public BlobChunk setChunk(byte[] chunk) { free(); this.chunk = chunk == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(chunk, chunk.length)); return this; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, BlobChunk struct) throws org.apache.thrift.TException { final ByteBuffer buffer = struct.getBufferForWrite(prot); try { writeData(prot, struct, buffer != null ? buffer : ClientSharedData.NULL_BUFFER); } finally { // free the blob once written struct.free(); } }
public BlobChunk setChunk(ByteBuffer chunk) { free(); this.chunk = chunk != null ? ByteBuffer.wrap(ThriftUtils.toBytes(chunk)) : null; return this; }
@Override public void write(org.apache.thrift.protocol.TProtocol oprot, BlobChunk struct) throws org.apache.thrift.TException { struct.validate(); final ByteBuffer chunk = struct.getBufferForWrite(oprot); try { writeData(oprot, struct, chunk); } finally { // free the blob once written struct.free(); } }
@Override public void clear() { free(); this.chunk = null; setLastIsSet(false); this.last = false; setLobIdIsSet(false); this.lobId = 0; setOffsetIsSet(false); this.offset = 0; setTotalLengthIsSet(false); this.totalLength = 0; }
chunk.free(); this.currentChunk = chunk = service.getBlobChunk( getLobSource(true, "Blob.readBytes"), chunk.lobId, offset,
chunk.free(); pstmt.setBlob(paramPosition, blob);
chunk.free(); return lobId; } catch (Throwable t) {