本文整理汇总了Java中com.sleepycat.bind.tuple.TupleOutput.writeUnsignedInt方法的典型用法代码示例。如果您正苦于以下问题:Java TupleOutput.writeUnsignedInt方法的具体用法?Java TupleOutput.writeUnsignedInt怎么用?Java TupleOutput.writeUnsignedInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sleepycat.bind.tuple.TupleOutput
的用法示例。
在下文中一共展示了TupleOutput.writeUnsignedInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: objectToData
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToData(Object obj, TupleOutput data) {
try {
FlowID id = (FlowID) obj;
data.writeByte(id.getProtocol() & 0x000000FF);
data.writeUnsignedInt(id.getSourceIP());
data.writeUnsignedInt(id.getDestinationIP());
data.writeUnsignedShort(id.getSourcePort());
data.writeUnsignedShort(id.getDestinationPort());
data.writeUnsignedInt(id.getStartTimeSeconds());
data.writeUnsignedInt(id.getStartTimeMicroseconds());
data.writeUnsignedInt(id.getEndTimeSeconds());
data.writeUnsignedInt(id.getEndTimeMicroseconds());
data.write(padding);
} catch (IOException ex) {
ex.printStackTrace();
}
}
示例2: createSecondaryKeys
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void createSecondaryKeys(TupleInput primaryKeyInput, TupleInput dataInput, Set<TupleOutput> indexKeys) {
TupleOutput interval;
dataInput.skipFast(13);
startTimeInterval = dataInput.readUnsignedInt();
startTimeInterval >>= 10;
dataInput.skipFast(4);
endTimeInterval = dataInput.readUnsignedInt();
endTimeInterval >>= 10;
for (long i = startTimeInterval; i <= endTimeInterval; ++i) {
interval = getTupleOutput(null);
interval.writeUnsignedInt(i);
indexKeys.add(interval);
}
}
示例3: createSecondaryKeys
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void createSecondaryKeys(TupleInput primaryKeyInput,
TupleInput dataInput,
Set<TupleOutput> indexKeys) {
long begin, end;
primaryKeyInput.skipFast(13);
begin = primaryKeyInput.readUnsignedInt() >> 10;
primaryKeyInput.skipFast(4);
end = primaryKeyInput.readUnsignedInt() >> 10;
for (long i = begin; i <= end; ++i) {
TupleOutput o = getTupleOutput(null);
o.writeUnsignedInt(i);
indexKeys.add(o);
}
}
示例4: objectToEntry
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToEntry(Object objKey, TupleOutput key) {
FlowIDFlowIDKey flowIDFlowIDKey = (FlowIDFlowIDKey) objKey;
key.writeByte(flowIDFlowIDKey.getProtocol());
key.writeUnsignedInt(flowIDFlowIDKey.getSourceIP());
key.writeUnsignedInt(flowIDFlowIDKey.getDestinationIP());
key.writeUnsignedShort(flowIDFlowIDKey.getSourcePort());
key.writeUnsignedShort(flowIDFlowIDKey.getDestinationPort());
}
示例5: createSecondaryKey
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public boolean createSecondaryKey(TupleInput keyInput, TupleInput dataInput, TupleOutput keyOutput) {
dataInput.skipFast(21);
endTimeInterval = dataInput.readUnsignedInt();
endTimeInterval >>= 10;
keyOutput.writeUnsignedInt(endTimeInterval);
return true;
}
示例6: objectToKey
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToKey(Object obj, TupleOutput key) {
// write the key
NEOFlow f = (NEOFlow) obj;
key.writeByte(f.getProtocol());
key.writeUnsignedShort(f.getSourcePort());
key.writeUnsignedShort(f.getDestinationPort());
key.writeUnsignedInt(f.getSourceIP());
key.writeUnsignedInt(f.getDestinationIP());
key.writeUnsignedInt(f.getStartTime().getSeconds());
key.writeUnsignedInt(f.getStartTime().getMicroSeconds());
key.writeUnsignedInt(f.getEndTime().getSeconds());
key.writeUnsignedInt(f.getEndTime().getMicroSeconds());
}
示例7: objectToData
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToData(Object obj, TupleOutput data) {
// write the data
// FIXME BUG in NEOFlow....ALL int should be unsigned int
NEOFlow f = (NEOFlow) obj;
data.writeInt(f.getPackets());
data.writeInt(f.getSize());
data.writeInt(f.getMin_packet_size());
data.writeInt(f.getMax_packet_size());
for (int i = 0; i < NEOFlow.MAX_HISTOGRAM_INDEX; ++i) {
data.writeInt(f.getHistogram(i));
}
data.writeUnsignedInt(f.getMinInterArrivalTime().getSeconds());
data.writeUnsignedInt(f.getMinInterArrivalTime().getMicroSeconds());
data.writeUnsignedInt(f.getMaxInterArrivalTime().getSeconds());
data.writeUnsignedInt(f.getMaxInterArrivalTime().getMicroSeconds());
data.writeByte(f.getTos());
data.writeUnsignedInt(f.getFragCount());
data.writeUnsignedByte(f.getMin_ttl());
data.writeUnsignedByte(f.getMax_ttl());
for (int i = 0; i < NEOFlow.NUM_TCP_FLAGS; ++i) {
data.writeInt(f.getTcpFlag(i));
}
data.writeUnsignedInt(f.getFirstSYNpackTime().getSeconds());
data.writeUnsignedInt(f.getFirstSYNpackTime().getMicroSeconds());
data.writeUnsignedInt(f.getFirstSYNACKpackTime().getSeconds());
data.writeUnsignedInt(f.getFirstSYNACKpackTime().getMicroSeconds());
data.writeUnsignedInt(f.getFirstACKpackTime().getSeconds());
data.writeUnsignedInt(f.getFirstACKpackTime().getMicroSeconds());
for (int i = 0; i < NEOFlow.NUM_TYPES; ++i) {
data.writeInt(f.getTypeCount(i));
}
}
示例8: createSecondaryKey
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public boolean createSecondaryKey(TupleInput primaryKeyInput,
TupleInput dataInput,
TupleOutput keyOutput) {
primaryKeyInput.skipFast(13);
keyOutput.writeUnsignedInt(primaryKeyInput.readUnsignedInt() >> 10);
return true;
}
示例9: createSecondaryKeys
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void createSecondaryKeys(TupleInput primaryKeyInput, TupleInput dataInput, Set<TupleOutput> indexKeys) {
TupleOutput src = getTupleOutput(null);
TupleOutput dest = getTupleOutput(null);
primaryKeyInput.skipFast(5);
src.writeUnsignedInt(primaryKeyInput.readUnsignedInt());
dest.writeUnsignedInt(primaryKeyInput.readUnsignedInt());
indexKeys.add(src);
indexKeys.add(dest);
}
示例10: createSecondaryKey
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public boolean createSecondaryKey(TupleInput primaryKeyInput,
TupleInput dataInput,
TupleOutput keyOutput) {
primaryKeyInput.skipFast(21);
keyOutput.writeUnsignedInt(primaryKeyInput.readUnsignedInt() >> 10);
return true;
}
示例11: intKey
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
private byte[] intKey(long fileNum, long seqNum) {
TupleOutput out = new TupleOutput();
out.writeUnsignedInt(fileNum);
out.writeUnsignedInt(seqNum);
return out.toByteArray();
}
示例12: writeToTupleOutput
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
void writeToTupleOutput(TupleOutput to) {
to.writePackedLong(fileNumber);
to.writePackedInt(stride);
to.writePackedLong(firstVLSN.getSequence());
to.writePackedLong(lastVLSN.getSequence());
to.writePackedLong(lastLsn);
to.writePackedInt(fileOffsets.size());
for (Integer offset: fileOffsets) {
to.writeUnsignedInt(DbLsn.convertIntFileOffsetToLong(offset));
}
}
示例13: objectToEntry
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToEntry(Object objKey, TupleOutput key) {
FlowIDHostKey flowIDHostKey = (FlowIDHostKey) objKey;
key.writeUnsignedInt(flowIDHostKey.getIP());
}
示例14: objectToEntry
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToEntry(Object objKey, TupleOutput key) {
FlowIDTimeKey flowIDEndTimeKey = (FlowIDTimeKey) objKey;
key.writeUnsignedInt(flowIDEndTimeKey.getEndTimeInterval());
}
示例15: objectToEntry
import com.sleepycat.bind.tuple.TupleOutput; //导入方法依赖的package包/类
@Override
public void objectToEntry(Object o, TupleOutput output) {
Long l = (Long) o;
output.writeUnsignedInt(l.longValue());
}