public void putBytes(final long offset, final byte[] bytes) { makeDirty(); System.arraycopy(bytes, 0, this.fBuffer, recPtrToIndex(offset), bytes.length); recordWrite(offset, bytes.length); }
public void putBytes(final long offset, final byte[] bytes) { makeDirty(); System.arraycopy(bytes, 0, this.fBuffer, recPtrToIndex(offset), bytes.length); recordWrite(offset, bytes.length); }
void put(final long offset, final byte[] data, int dataPos, final int len) { makeDirty(); int idx = recPtrToIndex(offset); System.arraycopy(data, dataPos, this.fBuffer, idx, len); recordWrite(offset, len); }
public void putCharsAsBytes(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len); }
public void putChar(final long offset, final char value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
public void putByte(final long offset, final byte value) { makeDirty(); this.fBuffer[recPtrToIndex(offset)]= value; recordWrite(offset, 1); }
public void put3ByteUnsignedInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 16); this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 3); }
public void putByte(final long offset, final byte value) { makeDirty(); this.fBuffer[recPtrToIndex(offset)]= value; recordWrite(offset, 1); }
public void putShort(final long offset, final short value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
public void putChars(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len * 2); }
public void putCharsAsBytes(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len); }
public void put3ByteUnsignedInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 16); this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 3); }
public void putLong(final long offset, final long value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 56); this.fBuffer[++idx]= (byte) (value >> 48); this.fBuffer[++idx]= (byte) (value >> 40); this.fBuffer[++idx]= (byte) (value >> 32); this.fBuffer[++idx]= (byte) (value >> 24); this.fBuffer[++idx]= (byte) (value >> 16); this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 8); }
public void putShort(final long offset, final short value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
/** * A Record Pointer is a pointer as returned by Database.malloc(). * This is a pointer to a block + BLOCK_HEADER_SIZE. */ public void putRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); Database.putRecPtr(value, this.fBuffer, idx); recordWrite(offset, 4); }
public void putInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); putInt(value, this.fBuffer, idx); recordWrite(offset, 4); }
/** * A Record Pointer is a pointer as returned by Database.malloc(). * This is a pointer to a block + BLOCK_HEADER_SIZE. */ public void putRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); Database.putRecPtr(value, this.fBuffer, idx); recordWrite(offset, 4); }
public void putInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); putInt(value, this.fBuffer, idx); recordWrite(offset, 4); }
void clear(final long offset, final int length) { makeDirty(); int idx = recPtrToIndex(offset); final int end = idx + length; if (end > this.fBuffer.length) { throw new IndexException("Attempting to clear beyond end of chunk. Chunk = " + this.fSequenceNumber //$NON-NLS-1$ + ", offset = " + offset + ", length = " + length); //$NON-NLS-1$//$NON-NLS-2$ } for (; idx < end; idx++) { this.fBuffer[idx] = 0; } recordWrite(offset, length); }
/** * A free Record Pointer is a pointer to a raw block, * i.e. the pointer is not moved past the BLOCK_HEADER_SIZE. */ public void putFreeRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); putInt(compressFreeRecPtr(value), this.fBuffer, idx); recordWrite(offset, 4); }