gpt4 book ai didi

io.protostuff.WireFormat类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 17:19:05 31 4
gpt4 key购买 nike

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

WireFormat介绍

[英]This class is used internally by the Protocol Buffer library and generated message implementations. It is public only because those generated messages do not reside in the protobuf package. Others should not use this class directly.

This class contains constants and helper functions useful for dealing with the Protocol Buffer wire format.
[中]该类由协议缓冲库和生成的消息实现在内部使用。它是公共的,只是因为这些生成的消息不在protobuf包中。其他人不应该直接使用这个类。
此类包含常量和帮助函数,可用于处理协议缓冲区连线格式。

代码示例

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

@Override
public void writeUInt32(int fieldNumber, int value, boolean repeated) throws IOException
{
  tail = writeTagAndRawVarInt32(
      makeTag(fieldNumber, WIRETYPE_VARINT),
      value,
      this,
      tail);
}

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

@Override
public void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian32(
      makeTag(fieldNumber, WIRETYPE_FIXED32),
      Float.floatToRawIntBits(value),
      this,
      tail);
}

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

@Override
public void writeFixed32(int fieldNumber, int value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian32(
      makeTag(fieldNumber, WIRETYPE_FIXED32),
      value,
      this,
      tail);
}

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

@Override
public void writeSFixed32(int fieldNumber, int value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian32(
      makeTag(fieldNumber, WIRETYPE_FIXED32),
      value,
      this,
      tail);
}

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

@Override
public void writeByteArray(int fieldNumber, byte[] bytes, boolean repeated) throws IOException
{
  tail = writeTagAndByteArray(
      makeTag(fieldNumber, WIRETYPE_LENGTH_DELIMITED),
      bytes, 0, bytes.length,
      this,
      tail);
}

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

@Override
public void writeUInt64(int fieldNumber, long value, boolean repeated) throws IOException
{
  tail = writeTagAndRawVarInt64(
      makeTag(fieldNumber, WIRETYPE_VARINT),
      value,
      this,
      tail);
}

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

@Override
public void writeFixed64(int fieldNumber, long value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian64(
      makeTag(fieldNumber, WIRETYPE_FIXED64),
      value,
      this,
      tail);
}

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

@Override
public void writeSFixed64(int fieldNumber, long value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian64(
      makeTag(fieldNumber, WIRETYPE_FIXED64),
      value,
      this,
      tail);
}

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

@Override
public void writeDouble(int fieldNumber, double value, boolean repeated) throws IOException
{
  tail = writeTagAndRawLittleEndian64(
      makeTag(fieldNumber, WIRETYPE_FIXED64),
      Double.doubleToRawLongBits(value),
      this,
      tail);
}

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

@Override
public void writeInt64(int fieldNumber, long value, boolean repeated) throws IOException
{
  tail = writeTagAndRawVarInt64(
      makeTag(fieldNumber, WIRETYPE_VARINT),
      value,
      this,
      tail);
}

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

@Override
public void writeBool(int fieldNumber, boolean value, boolean repeated) throws IOException
{
  tail = writeTagAndRawVarInt32(
      makeTag(fieldNumber, WIRETYPE_VARINT),
      value ? 1 : 0,
      this,
      tail);
}

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

@Override
public void writeByteRange(boolean utf8String, int fieldNumber, byte[] value,
    int offset, int length, boolean repeated) throws IOException
{
  tail = writeTagAndByteArray(
      makeTag(fieldNumber, WIRETYPE_LENGTH_DELIMITED),
      value, offset, length,
      this,
      tail);
}

代码示例来源:origin: fengjiachun/Jupiter

@Override
public <T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws IOException {
  writeVarInt32(makeTag(fieldNumber, WIRETYPE_START_GROUP));
  schema.writeTo(this, value);
  writeVarInt32(makeTag(fieldNumber, WIRETYPE_END_GROUP));
}

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

@Override
public <T> void writeObject(final int fieldNumber, final T value, final Schema<T> schema,
    final boolean repeated) throws IOException
{
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_START_GROUP));
  schema.writeTo(this, value);
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_END_GROUP));
}

代码示例来源:origin: fengjiachun/Jupiter

@Override
public <T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws IOException {
  writeVarInt32(makeTag(fieldNumber, WIRETYPE_START_GROUP));
  schema.writeTo(this, value);
  writeVarInt32(makeTag(fieldNumber, WIRETYPE_END_GROUP));
}

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

@Override
public void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException
{
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_FIXED32));
  buffer.writeInt32LE(Float.floatToRawIntBits(value));
}

代码示例来源:origin: fengjiachun/Jupiter

@Override
public void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException {
  writeVarInt32(makeTag(fieldNumber, WIRETYPE_FIXED32));
  writeInt32LE(Float.floatToRawIntBits(value));
}

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

@Override
public void writeDouble(int fieldNumber, double value, boolean repeated) throws IOException
{
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_FIXED64));
  buffer.writeInt64LE(Double.doubleToRawLongBits(value));
}

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

@Override
public void writeDouble(int fieldNumber, double value, boolean repeated) throws IOException
{
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_FIXED64));
  buffer.writeInt64LE(Double.doubleToRawLongBits(value));
}

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

@Override
public void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException
{
  buffer.writeVarInt32(makeTag(fieldNumber, WIRETYPE_FIXED32));
  buffer.writeInt32LE(Float.floatToRawIntBits(value));
}

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com