io.protostuff.Input.readFloat()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(133)

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

Input.readFloat介绍

[英]Reads a float field value.
[中]读取浮点字段值。

代码示例

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

@Override
public float readFloat() throws IOException
{
  return input.readFloat();
}

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

@Override
public Float readFrom(Input input) throws IOException
{
  return new Float(input.readFloat());
}

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

@Override
public Float readFrom(Input input) throws IOException
{
  return new Float(input.readFloat());
}

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

@Override
public Float readFrom(Input input) throws IOException
{
  return new Float(input.readFloat());
}

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

@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
    boolean repeated) throws IOException
{
  output.writeFloat(number, input.readFloat(), repeated);
}

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

@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
    boolean repeated) throws IOException
{
  output.writeFloat(number, input.readFloat(), repeated);
}

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

@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
    boolean repeated) throws IOException
{
  output.writeFloat(number, input.readFloat(), repeated);
}

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

protected Object readPrimitiveFrom(Input input, Object owner, int len)
    throws IOException
{
  float[] array = new float[len];
  if (input instanceof GraphInput)
  {
    // update the actual reference.
    ((GraphInput) input).updateLast(array, owner);
  }
  for (int i = 0; i < len; i++)
  {
    if (ID_ARRAY_DATA != input.readFieldNumber(this))
      throw new ProtostuffException("Corrupt input.");
    array[i] = input.readFloat();
  }
  if (0 != input.readFieldNumber(this))
    throw new ProtostuffException("Corrupt input.");
  return array;
}

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

protected Object readPrimitiveFrom(Input input, Object owner, int len)
    throws IOException
{
  float[] array = new float[len];
  if (input instanceof GraphInput)
  {
    // update the actual reference.
    ((GraphInput) input).updateLast(array, owner);
  }
  for (int i = 0; i < len; i++)
  {
    if (ID_ARRAY_DATA != input.readFieldNumber(this))
      throw new ProtostuffException("Corrupt input.");
    array[i] = input.readFloat();
  }
  if (0 != input.readFieldNumber(this))
    throw new ProtostuffException("Corrupt input.");
  return array;
}

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

protected Object readBoxedFrom(Input input, Object owner, int len)
    throws IOException
{
  final Float[] array = new Float[len];
  if (input instanceof GraphInput)
  {
    // update the actual reference.
    ((GraphInput) input).updateLast(array, owner);
  }
  for (int i = 0; i < len;)
  {
    switch (input.readFieldNumber(this))
    {
      case ID_ARRAY_DATA:
        array[i++] = input.readFloat();
        break;
      case ID_ARRAY_NULLCOUNT:
        i += input.readUInt32();
        break;
      default:
        throw new ProtostuffException("Corrupt input.");
    }
  }
  if (0 != input.readFieldNumber(this))
    throw new ProtostuffException("Corrupt input.");
  return array;
}

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

protected Object readBoxedFrom(Input input, Object owner, int len)
    throws IOException
{
  final Float[] array = new Float[len];
  if (input instanceof GraphInput)
  {
    // update the actual reference.
    ((GraphInput) input).updateLast(array, owner);
  }
  for (int i = 0; i < len;)
  {
    switch (input.readFieldNumber(this))
    {
      case ID_ARRAY_DATA:
        array[i++] = input.readFloat();
        break;
      case ID_ARRAY_NULLCOUNT:
        i += input.readUInt32();
        break;
      default:
        throw new ProtostuffException("Corrupt input.");
    }
  }
  if (0 != input.readFieldNumber(this))
    throw new ProtostuffException("Corrupt input.");
  return array;
}

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

if (message.someFloat == null)
    message.someFloat = new ArrayList<Float>();
  message.someFloat.add(input.readFloat());
  break;
case 8:

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

@Override
public void mergeFrom(Input input, FPNumbers message) throws IOException
{
  for (int number = input.readFieldNumber(this); ; number = input.readFieldNumber(this))
  {
    switch (number)
    {
      case 0:
        return;
      case 1:
        message.floatValue = input.readFloat();
        break;
      case 2:
        message.doubleValue = input.readDouble();
        break;
      default:
        input.handleUnknownField(number, this);
    }
  }
}

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

break;
case 7:
  message.someFloat = input.readFloat();
  break;
case 8:

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

@Override
public Object readFrom(Input input) throws IOException {
 return input.readFloat();
}

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

@Override
public void mergeFrom(Input input, Object message) throws IOException {
 setter.set(message, input.readFloat());
}

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

public void mergeFrom(Input input, ScanStats message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.type = ScanStatsType.valueOf(input.readEnum())
        ;
        break;
      case 2:
        message.recordCount = input.readInt64();
        break;
      case 3:
        message.cpuCost = input.readFloat();
        break;
      case 4:
        message.diskCost = input.readFloat();
        break;
      case 5:
        message.scanFactor = input.readDouble();
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

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

public void mergeFrom(Input input, TopOperation message) throws IOException
{
  for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
  {
    switch(number)
    {
      case 0:
        return;
      case 1:
        message.type = OperationType.valueOf(input.readEnum())
        ;
        break;
      case 2:
        message.timeConsumed = input.readFloat();
        break;
      default:
        input.handleUnknownField(number, this);
    }   
  }
}

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

builder.setNetworkCost(input.readFloat());
  break;
case 5:
  builder.setCpuCost(input.readFloat());
  break;
case 6:
  builder.setDiskCost(input.readFloat());
  break;
case 7:
  builder.setMemoryCost(input.readFloat());
  break;
case 8:

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

break;
case 6:
  message.floatValue = input.readFloat();
  break;
case 7:

相关文章