本文整理汇总了Java中org.hsqldb.rowio.RowOutputInterface类的典型用法代码示例。如果您正苦于以下问题:Java RowOutputInterface类的具体用法?Java RowOutputInterface怎么用?Java RowOutputInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowOutputInterface类属于org.hsqldb.rowio包,在下文中一共展示了RowOutputInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out, LongLookup lookup) {
int capacity = tableIds.length;
out.setStorageSize(storageSize);
for (int i = 0; i < capacity; i++) {
out.writeInt(tableIds[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeInt(bitmapAddress[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeChar(freeSpace[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeChar(freeSpaceBlock[i]);
}
out.writeEnd();
}
示例2: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
void write(RowOutputInterface out) throws IOException {
if (Trace.DOASSERT) {
// fredt - assert not correct - row can be deleted from one index but
// not yet deleted from other indexes while the process of finding
// the node is in progress which may require saving the row
// to make way for new rows in the cache
// Trace.doAssert(iBalance != -2);
}
out.writeIntData(iBalance);
out.writeIntData((iLeft == NO_POS) ? 0
: iLeft);
out.writeIntData((iRight == NO_POS) ? 0
: iRight);
out.writeIntData((iParent == NO_POS) ? 0
: iParent);
}
示例3: getRealSize
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public int getRealSize(RowOutputInterface out) {
RowOutputBinary bout = (RowOutputBinary) out;
int size = out.getSize(this);
if (updateData != null) {
size += bout.getSize(updateData, targetTable.getColumnCount(),
targetTable.getColumnTypes());
if (updateColMap != null) {
size += bout.getSize(updateColMap);
}
}
return size;
}
示例4: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out, LongLookup lookup) {
long leftTemp = getTranslatePointer(iLeft, lookup);
long rightTemp = getTranslatePointer(iRight, lookup);
long parentTemp = getTranslatePointer(iParent, lookup);
int ext = 0;
ext |= (int) ((parentTemp & 0xff00000000L) >> 8);
ext |= (int) ((leftTemp & 0xff00000000L) >> 16);
ext |= (int) ((rightTemp & 0xff00000000L) >> 24);
if (ext == 0) {
ext = iBalance;
} else {
ext |= (iBalance & 0xff);
}
out.writeInt(ext);
out.writeInt((int) leftTemp);
out.writeInt((int) rightTemp);
out.writeInt((int) parentTemp);
}
示例5: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out, ResultMetaData meta) {
reset();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = getNext();
out.writeData(meta.getExtendedColumnCount(), meta.columnTypes,
data, null, null);
}
reset();
}
示例6: writeTranslatePointer
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
private void writeTranslatePointer(int pointer, RowOutputInterface out,
org.hsqldb.lib.DoubleIntTable lookup)
throws IOException, HsqlException {
int newPointer = 0;
if (pointer != Node.NO_POS) {
int i = lookup.find(0, pointer);
if (i == -1) {
throw Trace.error(Trace.DiskNode_writeTranslatePointer);
}
newPointer = lookup.get(i, 1);
}
out.writeIntData(newPointer);
}
示例7: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out,
ResultMetaData meta) throws HsqlException, IOException {
int limit = size - currentOffset;
if (limit > table.length) {
limit = table.length;
}
out.writeLong(id);
out.writeInt(size);
out.writeInt(currentOffset);
out.writeInt(limit);
for (int i = 0; i < limit; i++) {
Object[] data = table[i];
out.writeData(meta.getColumnCount(), meta.columnTypes, data, null,
null);
}
}
示例8: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out,
ResultMetaData meta) throws IOException {
reset();
out.writeLong(id);
out.writeInt(size);
out.writeInt(0); // offset
out.writeInt(size);
while (hasNext()) {
Object[] data = (Object[]) getNext();
out.writeData(meta.getExtendedColumnCount(), meta.columnTypes,
data, null, null);
}
reset();
}
示例9: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
void write(RowOutputInterface out) throws IOException, HsqlException {
if (Trace.DOASSERT) {
// fredt - assert not correct - row can be deleted from one index but
// not yet deleted from other indexes while the process of finding
// the node is in progress which may require saving the row
// to make way for new rows in the cache
// Trace.doAssert(iBalance != -2);
}
out.writeIntData(iBalance);
out.writeIntData((iLeft == NO_POS) ? 0
: iLeft);
out.writeIntData((iRight == NO_POS) ? 0
: iRight);
out.writeIntData((iParent == NO_POS) ? 0
: iParent);
}
示例10: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out) {
int capacity = tableIds.length;
for (int i = 0; i < capacity; i++) {
out.writeInt(tableIds[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeInt(bitmapAddress[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeChar(freeSpace[i]);
}
for (int i = 0; i < capacity; i++) {
out.writeChar(freeSpaceBlock[i]);
}
out.writeEnd();
hasChanged = false;
}
示例11: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
/**
* Used exclusively by Cache to save the row to disk. New implementation in
* 1.7.2 writes out only the Node data if the table row data has not
* changed. This situation accounts for the majority of invocations as for
* each row deleted or inserted, the Nodes for several other rows will
* change.
*/
public void write(RowOutputInterface out) {
writeNodes(out);
if (hasDataChanged) {
out.writeData(this, table.colTypes);
out.writeEnd();
}
}
示例12: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
/**
* Writes the data to disk. Unlike CachedRow, hasChanged is never set
* to true when changes are made to the Nodes. (Nodes are in-memory).
* The only time this is used is when a new Row is added to the Caches.
*/
public void write(RowOutputInterface out) {
out.writeSize(storageSize);
out.writeData(oData, tTable);
out.writeEnd();
hasDataChanged = false;
}
示例13: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(RowOutputInterface out) {
out.writeInt(iBalance);
out.writeInt((iLeft == NO_POS) ? 0
: iLeft);
out.writeInt((iRight == NO_POS) ? 0
: iRight);
out.writeInt((iParent == NO_POS) ? 0
: iParent);
}
示例14: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
/**
* Used exclusively by Cache to save the row to disk. New implementation
* in 1.7.2 writes out only the Node data if the table row data has not
* changed. This situation accounts for the majority of invocations as
* for each row deleted or inserted, the Nodes for several other rows
* will change.
*
* @param output data source
* @throws IOException
* @throws HsqlException
*/
void write(RowOutputInterface out) throws IOException, HsqlException {
writeNodes(out);
if (hasDataChanged) {
out.writeData(oData, tTable);
out.writeEnd();
}
hasDataChanged = false;
}
示例15: write
import org.hsqldb.rowio.RowOutputInterface; //导入依赖的package包/类
public void write(SessionInterface session, DataOutputStream dataOut,
RowOutputInterface rowOut) throws IOException {
writeBody(session, dataOut);
dataOut.writeByte(ResultConstants.NONE);
dataOut.flush();
}