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

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

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

Input.transferByteRangeTo介绍

[英]Transfer the byte range to the output. Capable of zero-copy transfer depending on the type of input.
[中]将字节范围传输到输出。能够根据输入类型进行零拷贝传输。

代码示例

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

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

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

@Override
protected void transferArrayId(Input input, Output output, int fieldNumber,
    boolean mapped) throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

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

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

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

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

@Override
protected void transferKey(Pipe pipe, Input input, Output output, int number,
    boolean repeated) throws IOException
{
  input.transferByteRangeTo(output, true, number, repeated);
}

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

@Override
protected void transferArrayId(Input input, Output output, int fieldNumber,
    boolean mapped) throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

@Override
protected void transferClassId(Input input, Output output, int fieldNumber,
    boolean mapped, boolean array) throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

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

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

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

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

@Override
protected void transferCollectionId(Input input, Output output,
    int fieldNumber) throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

@Override
protected void transferMapId(Input input, Output output, int fieldNumber)
    throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

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

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

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

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

@Override
protected void transferMapId(Input input, Output output, int fieldNumber)
    throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

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

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

@Override
  protected void transferValue(Pipe pipe, Input input, Output output, int number,
      boolean repeated) throws IOException
  {
    input.transferByteRangeTo(output, true, number, repeated);
  }
};

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

@Override
protected void transferEnumId(Input input, Output output, int fieldNumber)
    throws IOException
{
  input.transferByteRangeTo(output, true, fieldNumber, false);
}

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

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

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

@Override
protected void transferClassId(Input input, Output output, int fieldNumber,
    boolean mapped, boolean array) throws IOException
{
  if (mapped)
    input.transferByteRangeTo(output, true, fieldNumber, false);
  else
    output.writeUInt32(fieldNumber, input.readUInt32(), false);
}

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

@Override
protected void transferArrayId(Input input, Output output, int fieldNumber,
    boolean mapped) throws IOException
{
  if (mapped)
    input.transferByteRangeTo(output, true, fieldNumber, false);
  else
    output.writeUInt32(fieldNumber, input.readUInt32(), false);
}

相关文章