当前位置: 首页>>代码示例>>Java>>正文


Java TupleOutput.writeUnsignedInt方法代码示例

本文整理汇总了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();
    }
}
 
开发者ID:nologic,项目名称:nabs,代码行数:21,代码来源:FlowIDEntityBinding.java

示例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);
    }
}
 
开发者ID:nologic,项目名称:nabs,代码行数:19,代码来源:FlowIDExistTimeKeyCreator.java

示例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);
    }
}
 
开发者ID:nologic,项目名称:nabs,代码行数:20,代码来源:NeoflowExistTimeKeyCreator.java

示例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());
}
 
开发者ID:nologic,项目名称:nabs,代码行数:10,代码来源:FlowIDFlowIDKeyBinding.java

示例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;
}
 
开发者ID:nologic,项目名称:nabs,代码行数:9,代码来源:FlowIDEndTimeKeyCreator.java

示例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());
}
 
开发者ID:nologic,项目名称:nabs,代码行数:16,代码来源:NeoflowEntityBinding.java

示例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));
    }
}
 
开发者ID:nologic,项目名称:nabs,代码行数:35,代码来源:NeoflowEntityBinding.java

示例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;
}
 
开发者ID:nologic,项目名称:nabs,代码行数:11,代码来源:NeoflowStartTimeKeyCreator.java

示例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);
}
 
开发者ID:nologic,项目名称:nabs,代码行数:13,代码来源:NeoflowHostKeyCreator.java

示例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;
}
 
开发者ID:nologic,项目名称:nabs,代码行数:11,代码来源:NeoflowEndTimeKeyCreator.java

示例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();
    }
 
开发者ID:nologic,项目名称:nabs,代码行数:8,代码来源:SR13061Test.java

示例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));
        }
    }
 
开发者ID:prat0318,项目名称:dbms,代码行数:13,代码来源:VLSNBucket.java

示例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());
}
 
开发者ID:nologic,项目名称:nabs,代码行数:7,代码来源:FlowIDHostKeyBinding.java

示例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());
}
 
开发者ID:nologic,项目名称:nabs,代码行数:7,代码来源:FlowIDTimeKeyBinding.java

示例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());
}
 
开发者ID:nologic,项目名称:nabs,代码行数:6,代码来源:UnsignedIntegerBinding.java


注:本文中的com.sleepycat.bind.tuple.TupleOutput.writeUnsignedInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。