本文整理了Java中io.protostuff.Input.readInt32()
方法的一些代码示例,展示了Input.readInt32()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.readInt32()
方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:readInt32
[英]Reads a variable int field value.
[中]读取变量int字段值。
代码示例来源:origin: protostuff/protostuff
public void mergeFrom(Input input, A message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.value = input.readInt32();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
public void mergeFrom(Input input, GeneratedInt1 message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.a0 = input.readInt32();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源: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();
return primitive ? readPrimitiveFrom(input, owner, len) :
readBoxedFrom(input, owner, len);
}
代码示例来源:origin: protostuff/protostuff
protected Object readPrimitiveFrom(Input input, Object owner, int len)
throws IOException
{
int[] array = new int[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.readInt32();
}
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
{
int[] array = new int[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.readInt32();
}
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 Integer[] array = new Integer[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.readInt32();
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 Integer[] array = new Integer[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.readInt32();
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;
}
内容来源于网络,如有侵权,请联系作者删除!