本文整理了Java中io.protostuff.Input.readBytes()
方法的一些代码示例,展示了Input.readBytes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.readBytes()
方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:readBytes
[英]Reads a ByteString field value.
[中]读取ByteString字段值。
代码示例来源:origin: protostuff/protostuff
@Override
public ByteString readBytes() throws IOException
{
return input.readBytes();
}
代码示例来源:origin: protostuff/protostuff
@Override
public void readBytes(final ByteBuffer bb) throws IOException
{
input.readBytes(bb);
}
代码示例来源:origin: protostuff/protostuff
@Override
public ByteString readFrom(Input input) throws IOException
{
return input.readBytes();
}
代码示例来源:origin: protostuff/protostuff
@Override
public ByteString readFrom(Input input) throws IOException
{
return input.readBytes();
}
代码示例来源:origin: protostuff/protostuff
@Override
public ByteString readFrom(Input input) throws IOException
{
return input.readBytes();
}
代码示例来源:origin: protostuff/protostuff
if (message.someBytes == null)
message.someBytes = new ArrayList<ByteString>();
message.someBytes.add(input.readBytes());
break;
case 6:
代码示例来源:origin: protostuff/protostuff
@Override
public Object readFrom(Input input, Object owner) throws IOException
{
if (ID_ARRAY_LEN != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
final int len = input.readInt32();
ByteString[] array = new ByteString[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.readBytes();
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
@Override
public Object readFrom(Input input, Object owner) throws IOException
{
if (ID_ARRAY_LEN != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
final int len = input.readInt32();
ByteString[] array = new ByteString[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.readBytes();
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
break;
case 5:
message.someBytes = input.readBytes();
break;
case 6:
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, SourceWrapper message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.bytes = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, CompleteRpcMessage message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.header = input.mergeObject(message.header, RpcHeader.getSchema());
break;
case 2:
message.protobufBody = input.readBytes();
break;
case 3:
message.rawBody = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, PreparedStatementHandle message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.serverInfo = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, UserAuth message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.uid = input.mergeObject(message.uid, UID.getSchema())
;
break;
case 2:
message.prefix = input.readBytes();
break;
case 3:
message.authKey = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, DatasetField message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.fieldName = input.readString();
break;
case 2:
message.fieldSchema = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, ExtraInfo message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.name = input.readString();
break;
case 2:
message.data = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, FabricMessage message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.protocolId = input.readInt32();
break;
case 2:
message.innerRpcType = input.readInt32();
break;
case 3:
message.message = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, SchedulingInfo message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.queueId = input.readString();
break;
case 2:
message.workloadClass = WorkloadClass.valueOf(input.readEnum());
break;
case 3:
message.additionalInfo = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, ConfigurationEntry message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.type = input.readString();
break;
case 2:
message.value = input.readBytes();
break;
case 3:
message.version = input.readInt64();
break;
case 4:
message.tag = input.readString();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, SharedData message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.majorFragmentId = input.readInt32();
break;
case 2:
message.operatorId = input.readInt32();
break;
case 3:
message.name = input.readString();
break;
case 4:
message.value = input.readBytes();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, PhysicalDataset message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.formatSettings = input.mergeObject(message.formatSettings, com.dremio.service.namespace.file.proto.FileConfig.getSchema())
;
break;
case 2:
message.deprecatedDatasetSchema = input.readBytes();
break;
case 3:
message.isAppendOnly = input.readBool();
break;
case 4:
message.accelerationSettings = input.mergeObject(message.accelerationSettings, AccelerationSettings.getSchema())
;
break;
case 5:
message.allowApproxStats = input.readBool();
break;
default:
input.handleUnknownField(number, this);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!