io.protostuff.Output.writeSFixed64()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中io.protostuff.Output.writeSFixed64()方法的一些代码示例,展示了Output.writeSFixed64()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.writeSFixed64()方法的具体详情如下:
包路径:io.protostuff.Output
类名称:Output
方法名:writeSFixed64

Output.writeSFixed64介绍

[英]Writes a signed+fixed long(8 bytes) field.
[中]写入有符号+固定长(8字节)字段。

代码示例

代码示例来源:origin: protostuff/protostuff

@Override
public void writeSFixed64(int fieldNumber, long value, boolean repeated) throws IOException
{
  output.writeSFixed64(fieldNumber, value, repeated);
}

代码示例来源:origin: protostuff/protostuff

@Override
public void writeTo(Output output, PojoWithInts message) throws IOException
{
  if (message.someInt32 != 0)
    output.writeInt32(1, message.someInt32, false);
  if (message.someUint32 != 0)
    output.writeUInt32(2, message.someUint32, false);
  if (message.someSint32 != 0)
    output.writeSInt32(3, message.someSint32, false);
  if (message.someFixed32 != 0)
    output.writeFixed32(4, message.someFixed32, false);
  if (message.someSfixed32 != 0)
    output.writeSFixed32(5, message.someSfixed32, false);
  if (message.someInt64 != 0)
    output.writeInt64(11, message.someInt64, false);
  if (message.someUint64 != 0)
    output.writeUInt64(12, message.someUint64, false);
  if (message.someSint64 != 0)
    output.writeSInt64(13, message.someSint64, false);
  if (message.someFixed64 != 0)
    output.writeFixed64(14, message.someFixed64, false);
  if (message.someSfixed64 != 0)
    output.writeSFixed64(15, message.someSfixed64, false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, QueryId message) throws IOException
{
  if(message.part1 != 0)
    output.writeSFixed64(1, message.part1, false);
  if(message.part2 != 0)
    output.writeSFixed64(2, message.part2, false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, ExternalId message) throws IOException
{
  if(message.part1 != 0)
    output.writeSFixed64(1, message.part1, false);
  if(message.part2 != 0)
    output.writeSFixed64(2, message.part2, false);
}

代码示例来源:origin: org.apache.servicecomb/foundation-protobuf

@Override
 public void writeTo(Output output, Object value) throws IOException {
  if (value == null) {
   return;
  }

  if (value instanceof Number) {
   output.writeSFixed64(number, ((Number) value).longValue(), repeated);
   return;
  }

  if (value instanceof String[]) {
   if (((String[]) value).length == 0) {
    return;
   }
   long v = Long.parseLong(((String[]) value)[0], 10);
   output.writeSFixed64(number, v, repeated);
   return;
  }

  if (value instanceof String) {
   long v = Long.parseLong((String) value, 10);
   output.writeSFixed64(number, v, repeated);
   return;
  }

  throwNotSupportValue(value);
 }
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.QueryId message) throws java.io.IOException
{
  if(message.hasPart1())
    output.writeSFixed64(1, message.getPart1(), false);
  if(message.hasPart2())
    output.writeSFixed64(2, message.getPart2(), false);
}
public boolean isInitialized(com.dremio.exec.proto.UserBitShared.QueryId message)

代码示例来源:origin: dremio/dremio-oss

public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.ExternalId message) throws java.io.IOException
{
  if(message.hasPart1())
    output.writeSFixed64(1, message.getPart1(), false);
  if(message.hasPart2())
    output.writeSFixed64(2, message.getPart2(), false);
}
public boolean isInitialized(com.dremio.exec.proto.UserBitShared.ExternalId message)

相关文章