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


Java TupleOutput.writeUnsignedShort方法代码示例

本文整理汇总了Java中com.sleepycat.bind.tuple.TupleOutput.writeUnsignedShort方法的典型用法代码示例。如果您正苦于以下问题:Java TupleOutput.writeUnsignedShort方法的具体用法?Java TupleOutput.writeUnsignedShort怎么用?Java TupleOutput.writeUnsignedShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sleepycat.bind.tuple.TupleOutput的用法示例。


在下文中一共展示了TupleOutput.writeUnsignedShort方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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


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