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

The following examples show how to use io.protostuff.Input#readFixed64() . 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: ArraySchemas.java    From protostuff with Apache License 2.0 5 votes vote down vote up
@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();

    Date[] array = new Date[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++] = new Date(input.readFixed64());
                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;
}
 
Example 2
Source File: TimeDelegate.java    From joyrpc with Apache License 2.0 4 votes vote down vote up
@Override
public Time readFrom(Input input) throws IOException {
    return new Time(input.readFixed64());
}
 
Example 3
Source File: SqlDateDelegate.java    From joyrpc with Apache License 2.0 4 votes vote down vote up
@Override
public java.sql.Date readFrom(Input input) throws IOException {
    return new java.sql.Date(input.readFixed64());
}
 
Example 4
Source File: TimestampDelegate.java    From joyrpc with Apache License 2.0 4 votes vote down vote up
@Override
public Timestamp readFrom(Input input) throws IOException {
    return new Timestamp(input.readFixed64());
}
 
Example 5
Source File: DateDelegate.java    From tx-lcn with Apache License 2.0 4 votes vote down vote up
public Date readFrom(Input input) throws IOException {
    return new Date(input.readFixed64());
}
 
Example 6
Source File: TimestampDelegate.java    From tx-lcn with Apache License 2.0 4 votes vote down vote up
public Timestamp readFrom(Input input) throws IOException {
    return new Timestamp(input.readFixed64());
}
 
Example 7
Source File: RuntimeUnsafeFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public Date readFrom(Input input) throws IOException
{
    return new Date(input.readFixed64());
}
 
Example 8
Source File: RuntimeReflectionFieldFactory.java    From protostuff with Apache License 2.0 4 votes vote down vote up
@Override
public Date readFrom(Input input) throws IOException
{
    return new Date(input.readFixed64());
}