当前位置: 首页>>代码示例>>Java>>正文


Java Input.readBoolean方法代码示例

本文整理汇总了Java中com.esotericsoftware.kryo.io.Input.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java Input.readBoolean方法的具体用法?Java Input.readBoolean怎么用?Java Input.readBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.esotericsoftware.kryo.io.Input的用法示例。


在下文中一共展示了Input.readBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public BSpline read(Kryo kryo, Input input, Class<BSpline> type) {
    BSpline bSpline = new BSpline();
    Class<? extends Vector> vectorType = kryo.readClass(input).getType();
    int controlPointsLength = input.readInt();
    if (controlPointsLength >= 0){
        Vector<?>[] controlPoints = (Vector<?>[])java.lang.reflect.Array.newInstance(vectorType, controlPointsLength);
        for (int i = 0; i < controlPointsLength; i++) {
            controlPoints[i] = kryo.readObjectOrNull(input, vectorType); // vector type won't be null if control points had a length
        }
        bSpline.controlPoints = controlPoints;
    }
    bSpline.knots = kryo.readObjectOrNull(input, Array.class);
    bSpline.degree = input.readInt(true);
    bSpline.continuous = input.readBoolean();
    bSpline.spanCount = input.readInt(true);
    return bSpline;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:19,代码来源:BSplineSerializer.java

示例2: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public T read(Kryo kryo, Input input, Class<T> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    Class cls = kryo.readClass(input).getType();
    T array = create(ordered, length, cls);
    kryo.reference(array);
    Class elementClass = null;
    Serializer serializer = null;
    if (genericType != null) {
        elementClass = genericType;
        serializer = kryo.getSerializer(genericType);
        genericType = null;
    }
    if (serializer != null) {
        for (int i = 0; i < length; i++)
            array.add(kryo.readObjectOrNull(input, elementClass, serializer));
    } else {
        for (int i = 0; i < length; i++)
            array.add(kryo.readClassAndObject(input));
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:24,代码来源:ArraySerializer.java

示例3: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public DefaultLink read(Kryo kryo, Input input, Class<DefaultLink> type) {
    ProviderId providerId = (ProviderId) kryo.readClassAndObject(input);
    ConnectPoint src = (ConnectPoint) kryo.readClassAndObject(input);
    ConnectPoint dst = (ConnectPoint) kryo.readClassAndObject(input);
    Type linkType = (Type) kryo.readClassAndObject(input);
    State state = (State) kryo.readClassAndObject(input);
    boolean isDurable = input.readBoolean();
    return DefaultLink.builder()
            .providerId(providerId)
            .src(src)
            .dst(dst)
            .type(linkType)
            .state(state)
            .isExpected(isDurable)
            .build();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:18,代码来源:DefaultLinkSerializer.java

示例4: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public final void read (Kryo kryo, Input input) {
    pushHeader(kryo, this);
    input.readInt(true); //if this class ever evolves, version can be used for backward compatibility
    Class dataType = kryo.readClass(input).getType();
    gdxMajorVersion = input.readInt(true);
    gdxMinorVersion = input.readInt(true);
    gdxRevisionVersion = input.readInt(true);
    writtenVersion = input.readInt(true);
    minimumReadVersion = input.readInt(true);
    minimumReadVersionString = input.readString();
    useCompactColor = input.readBoolean();
    includePixmapDrawingParams = input.readBoolean();
    readExtra(kryo, input);
    if (dataType != null && minimumReadVersion <= currentReadWriteVersion){
        data = (T)kryo.readObject(input, dataType);
    }
    popHeader(kryo);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:20,代码来源:GraphHeader.java

示例5: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public DefaultPort read(Kryo kryo, Input input, Class<DefaultPort> aClass) {
    Element element = (Element) kryo.readClassAndObject(input);
    PortNumber number = kryo.readObject(input, PortNumber.class);
    boolean isEnabled = input.readBoolean();
    Port.Type type = kryo.readObject(input, Port.Type.class);
    long portSpeed = input.readLong();
    Annotations annotations = (Annotations) kryo.readClassAndObject(input);

    return new DefaultPort(element, number, isEnabled, type, portSpeed, annotations);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:12,代码来源:DefaultPortSerializer.java

示例6: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public CharArray read(Kryo kryo, Input input, Class<CharArray> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    CharArray array = new CharArray(ordered, length);
    for (int i = 0; i < length; i++) {
        array.add(input.readChar());
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:CharArraySerializer.java

示例7: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public T read (Kryo kryo, Input input, Class<T> type) {
    int length = input.readVarInt(true);
    input.readBoolean(); // currently unused
    T map = create(length);

    Class keyClass = null;
    Class valueClass = null;

    Serializer keySerializer = null;
    if (keyGenericType != null) {
        keyClass = keyGenericType;
        if (keySerializer == null) keySerializer = kryo.getSerializer(keyClass);
        keyGenericType = null;
    }
    Serializer valueSerializer = null;
    if (valueGenericType != null) {
        valueClass = valueGenericType;
        if (valueSerializer == null) valueSerializer = kryo.getSerializer(valueClass);
        valueGenericType = null;
    }

    kryo.reference(map);

    for (int i = 0; i < length; i++) {
        Object key;
        if (keySerializer != null) {
            key = kryo.readObject(input, keyClass, keySerializer);
        } else
            key = kryo.readClassAndObject(input);
        Object value;
        if (valueSerializer != null) {
            value = kryo.readObjectOrNull(input, valueClass, valueSerializer);
        } else
            value = kryo.readClassAndObject(input);
        map.put(key, value);
    }
    return map;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:39,代码来源:ObjectMapSerializer.java

示例8: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public FloatArray read(Kryo kryo, Input input, Class<FloatArray> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    FloatArray array = new FloatArray(ordered, length);
    for (int i = 0; i < length; i++) {
        array.add(input.readFloat());
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:FloatArraySerializer.java

示例9: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public ObjectFloatMap read (Kryo kryo, Input input, Class<ObjectFloatMap> type) {
    int length = input.readVarInt(true);
    input.readBoolean(); // currently unused
    ObjectFloatMap map = create(length);

    Class keyClass = null;

    Serializer keySerializer = null;
    if (keyGenericType != null) {
        keyClass = keyGenericType;
        if (keySerializer == null) keySerializer = kryo.getSerializer(keyClass);
        keyGenericType = null;
    }

    kryo.reference(map);

    for (int i = 0; i < length; i++) {
        Object key;
        if (keySerializer != null) {
            key = kryo.readObject(input, keyClass, keySerializer);
        } else
            key = kryo.readClassAndObject(input);
        float value = input.readFloat();
        map.put(key, value);
    }
    return map;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:28,代码来源:ObjectFloatMapSerializer.java

示例10: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public PortNumber read(Kryo kryo, Input input, Class<PortNumber> type) {
    if (input.readBoolean()) {
        return PortNumber.portNumber(input.readLong(), input.readString());
    } else {
        return PortNumber.portNumber(input.readLong());
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:9,代码来源:PortNumberSerializer.java

示例11: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public IdentityMap read (Kryo kryo, Input input, Class<IdentityMap> type) {
    int length = input.readVarInt(true);
    input.readBoolean(); // currently unused
    IdentityMap map = new IdentityMap(length);

    Class keyClass = null;
    Class valueClass = null;

    Serializer keySerializer = null;
    if (keyGenericType != null) {
        keyClass = keyGenericType;
        if (keySerializer == null) keySerializer = kryo.getSerializer(keyClass);
        keyGenericType = null;
    }
    Serializer valueSerializer = null;
    if (valueGenericType != null) {
        valueClass = valueGenericType;
        if (valueSerializer == null) valueSerializer = kryo.getSerializer(valueClass);
        valueGenericType = null;
    }

    kryo.reference(map);

    for (int i = 0; i < length; i++) {
        Object key;
        if (keySerializer != null) {
            key = kryo.readObject(input, keyClass, keySerializer);
        } else
            key = kryo.readClassAndObject(input);
        Object value;
        if (valueSerializer != null) {
            value = kryo.readObjectOrNull(input, valueClass, valueSerializer);
        } else
            value = kryo.readClassAndObject(input);
        map.put(key, value);
    }
    return map;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:39,代码来源:IdentityMapSerializer.java

示例12: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public ByteArray read(Kryo kryo, Input input, Class<ByteArray> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    ByteArray array = new ByteArray(ordered, length);
    for (int i = 0; i < length; i++) {
        array.add(input.readByte());
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:ByteArraySerializer.java

示例13: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public ShortArray read(Kryo kryo, Input input, Class<ShortArray> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    ShortArray array = new ShortArray(ordered, length);
    for (int i = 0; i < length; i++) {
        array.add(input.readShort());
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:ShortArraySerializer.java

示例14: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public IntArray read(Kryo kryo, Input input, Class<IntArray> type) {
    int length = input.readVarInt(true);
    boolean ordered = input.readBoolean();
    IntArray array = new IntArray(ordered, length);
    for (int i = 0; i < length; i++) {
        array.add(input.readInt());
    }
    return array;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:11,代码来源:IntArraySerializer.java

示例15: read

import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public LongMap read (Kryo kryo, Input input, Class<LongMap> type) {
    int length = input.readVarInt(true);
    input.readBoolean(); // currently unused
    LongMap map = new LongMap(length);

    Class valueClass = null;

    Serializer valueSerializer = null;
    if (valueGenericType != null) {
        valueClass = valueGenericType;
        if (valueSerializer == null) valueSerializer = kryo.getSerializer(valueClass);
        valueGenericType = null;
    }

    kryo.reference(map);

    for (int i = 0; i < length; i++) {
        long key = input.readLong();
        Object value;
        if (valueSerializer != null) {
            value = kryo.readObjectOrNull(input, valueClass, valueSerializer);
        } else
            value = kryo.readClassAndObject(input);
        map.put(key, value);
    }
    return map;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:28,代码来源:LongMapSerializer.java


注:本文中的com.esotericsoftware.kryo.io.Input.readBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。