Java Code Examples for io.protostuff.Input#transferByteRangeTo()

The following examples show how to use io.protostuff.Input#transferByteRangeTo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EnumIO.java    From protostuff with Apache License 2.0 5 votes vote down vote up
/**
 * Transfers the {@link Enum} from the input to the output.
 */
public static void transfer(Pipe pipe, Input input, Output output,
        int number, boolean repeated, IdStrategy strategy) throws IOException
{
    if (0 == (IdStrategy.ENUMS_BY_NAME & strategy.flags))
        output.writeEnum(number, input.readEnum(), repeated);
    else
        input.transferByteRangeTo(output, true, number, repeated);
}
 
Example 2
Source File: NumericIdStrategy.java    From protostuff with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 3
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, false, number, repeated);
}
 
Example 4
Source File: DefaultIdStrategy.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferArrayId(Input input, Output output, int fieldNumber,
        boolean mapped) throws IOException
{
    input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 5
Source File: DefaultIdStrategy.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferEnumId(Input input, Output output, int fieldNumber)
        throws IOException
{
    input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 6
Source File: DefaultIdStrategy.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferMapId(Input input, Output output, int fieldNumber)
        throws IOException
{
    input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 7
Source File: DefaultIdStrategy.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferCollectionId(Input input, Output output,
        int fieldNumber) throws IOException
{
    input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 8
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, false, number, repeated);
}
 
Example 9
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, true, number, repeated);
}
 
Example 10
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, false, number, repeated);
}
 
Example 11
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, false, number, repeated);
}
 
Example 12
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, true, number, repeated);
}
 
Example 13
Source File: FastIdStrategy.java    From turbo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferCollectionId(Input input, Output output, int fieldNumber) throws IOException {
	input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 14
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, true, number, repeated);
}
 
Example 15
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public void transfer(Pipe pipe, Input input, Output output, int number,
        boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, false, number, repeated);
}
 
Example 16
Source File: DefaultIdStrategy.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferClassId(Input input, Output output, int fieldNumber,
        boolean mapped, boolean array) throws IOException
{
    input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 17
Source File: FastIdStrategy.java    From turbo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferClassId(Input input, Output output, int fieldNumber, boolean mapped, boolean array)
		throws IOException {
	input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 18
Source File: FastIdStrategy.java    From turbo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferArrayId(Input input, Output output, int fieldNumber, boolean mapped) throws IOException {
	input.transferByteRangeTo(output, true, fieldNumber, false);
}
 
Example 19
Source File: AbstractRuntimeObjectSchemaTest.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException
{
    input.transferByteRangeTo(output, true, number, repeated);
}
 
Example 20
Source File: FastIdStrategy.java    From turbo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
protected void transferMapId(Input input, Output output, int fieldNumber) throws IOException {
	input.transferByteRangeTo(output, true, fieldNumber, false);
}