本文整理了Java中io.protostuff.Input.readUInt32()
方法的一些代码示例,展示了Input.readUInt32()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.readUInt32()
方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:readUInt32
[英]Reads an unsigned int field value.
[中]读取无符号整型字段值。
代码示例来源:origin: protostuff/protostuff
@Override
public int readUInt32() throws IOException
{
return input.readUInt32();
}
代码示例来源:origin: protostuff/protostuff
@Override
public Byte readFrom(Input input) throws IOException
{
return Byte.valueOf((byte) input.readUInt32());
}
代码示例来源:origin: protostuff/protostuff
@Override
public Character readFrom(Input input) throws IOException
{
return Character.valueOf((char) input.readUInt32());
}
代码示例来源:origin: protostuff/protostuff
@Override
public Byte readFrom(Input input) throws IOException
{
return Byte.valueOf((byte) input.readUInt32());
}
代码示例来源:origin: protostuff/protostuff
@Override
public Character readFrom(Input input) throws IOException
{
return Character.valueOf((char) input.readUInt32());
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transferCollectionId(Input input, Output output, int fieldNumber)
throws IOException
{
output.writeUInt32(fieldNumber, input.readUInt32(), false);
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transferEnumId(Input input, Output output,
int fieldNumber) throws IOException
{
output.writeUInt32(fieldNumber, input.readUInt32(), false);
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transferCollectionId(Input input, Output output,
int fieldNumber) throws IOException
{
output.writeUInt32(fieldNumber, input.readUInt32(), false);
}
代码示例来源:origin: protostuff/protostuff
@Override
protected CollectionSchema.MessageFactory resolveCollectionFrom(Input input)
throws IOException
{
final int id = input.readUInt32();
final CollectionSchema.MessageFactory factory = id < collections.size() ?
collections.get(id) : null;
if (factory == null)
throw new UnknownTypeException("collection id: " + id + " (Outdated registry)");
return factory;
}
代码示例来源:origin: protostuff/protostuff
@Override
@SuppressWarnings("unchecked")
protected <T> HasSchema<T> resolvePojoFrom(Input input, int fieldNumber)
throws IOException
{
final int id = input.readUInt32();
final BaseHS<T> wrapper = id < pojos.size() ? (BaseHS<T>) pojos.get(id) : null;
if (wrapper == null)
throw new UnknownTypeException("pojo id: " + id + " (Outdated registry)");
return wrapper;
}
代码示例来源:origin: protostuff/protostuff
@Override
protected CollectionSchema.MessageFactory resolveCollectionFrom(Input input)
throws IOException
{
final int id = input.readUInt32();
final RuntimeCollectionFactory factory = id < collections.size() ?
collections.get(id) : null;
if (factory == null)
throw new UnknownTypeException("Unknown collection id: " + id);
return factory;
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transferEnumId(Input input, Output output, int fieldNumber)
throws IOException
{
output.writeUInt32(fieldNumber, input.readUInt32(), false);
}
代码示例来源:origin: protostuff/protostuff
@Override
protected EnumIO<?> resolveEnumFrom(Input input) throws IOException
{
final int id = input.readUInt32();
final RuntimeEnumIO reio = id < enums.size() ? enums.get(id) : null;
if (reio == null)
throw new UnknownTypeException("Unknown enum id: " + id);
return reio.eio;
}
代码示例来源:origin: protostuff/protostuff
@Override
@SuppressWarnings("unchecked")
protected <T> HasDelegate<T> resolveDelegateFrom(Input input) throws IOException
{
final int id = input.readUInt32();
final RegisteredDelegate<T> rd = id < delegates.size() ?
(RegisteredDelegate<T>) delegates.get(id) : null;
if (rd == null)
throw new UnknownTypeException("delegate id: " + id + " (Outdated registry)");
return rd;
}
代码示例来源:origin: protostuff/protostuff
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
boolean repeated) throws IOException
{
output.writeUInt32(number, input.readUInt32(), repeated);
}
代码示例来源:origin: protostuff/protostuff
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
boolean repeated) throws IOException
{
output.writeUInt32(number, input.readUInt32(), repeated);
}
代码示例来源:origin: protostuff/protostuff
@Override
@SuppressWarnings("unchecked")
protected <T> HasSchema<T> transferPojoId(Input input, Output output,
int fieldNumber) throws IOException
{
final int id = input.readUInt32();
final BaseHS<T> wrapper = (BaseHS<T>) pojos.get(id);
if (wrapper == null)
throw new UnknownTypeException("pojo id: " + id + " (Outdated registry)");
output.writeUInt32(fieldNumber, id, false);
return wrapper;
}
代码示例来源: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);
}
代码示例来源:origin: protostuff/protostuff
@Override
public Singleton readFrom(Input input) throws IOException
{
if (0 != input.readUInt32())
throw new ProtostuffException("Corrupt input.");
return Singleton.INSTANCE;
}
代码示例来源:origin: protostuff/protostuff
static void transferClass(Pipe pipe, Input input, Output output, int number,
Pipe.Schema<?> pipeSchema, boolean mapped, boolean array,
IdStrategy strategy) throws IOException
{
strategy.transferClassId(input, output, number, mapped, array);
if (array)
{
if (input.readFieldNumber(pipeSchema.wrappedSchema) != ID_ARRAY_DIMENSION)
throw new ProtostuffException("Corrupt input.");
output.writeUInt32(ID_ARRAY_DIMENSION, input.readUInt32(), false);
}
}
内容来源于网络,如有侵权,请联系作者删除!