當前位置: 首頁>>代碼示例>>Java>>正文


Java Input.readLong方法代碼示例

本文整理匯總了Java中com.esotericsoftware.kryo.io.Input.readLong方法的典型用法代碼示例。如果您正苦於以下問題:Java Input.readLong方法的具體用法?Java Input.readLong怎麽用?Java Input.readLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.esotericsoftware.kryo.io.Input的用法示例。


在下文中一共展示了Input.readLong方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: read

import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
public ArrayMetaData<long[]> read(Kryo kryo, Input input, Class<ArrayMetaData<long[]>> type) {
    try {
        long[] arrData = arrayMetaData.getArrData();
        thatArrMetaData = arrayMetaData.recv(input);
        int arrSegNum = thatArrMetaData.getSegNum();
        for (int i = 0; i < arrSegNum; i++) {
            int from = thatArrMetaData.getFrom(i);
            int to = thatArrMetaData.getTo(i);
            for (int j = from; j < to; j++) {
                arrData[j] = input.readLong();
            }
        }
        thatArrMetaData.setArrData(arrData);
    } catch (IOException e) {
        LOG.error("double array read exception", e);
        System.exit(1);
    }
    return thatArrMetaData;

}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:21,代碼來源:LongOperand.java

示例2: 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

示例3: 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

示例4: read

import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public HostLocation read(Kryo kryo, Input input, Class<HostLocation> type) {
    DeviceId deviceId = (DeviceId) kryo.readClassAndObject(input);
    PortNumber portNumber = (PortNumber) kryo.readClassAndObject(input);
    long time = input.readLong();
    return new HostLocation(deviceId, portNumber, time);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:8,代碼來源:HostLocationSerializer.java

示例5: read

import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public RandomXS128 read(Kryo kryo, Input input, Class<RandomXS128> type) {
    long seed0 = input.readLong();
    long seed1 = input.readLong();
    return new RandomXS128(seed0, seed1);
}
 
開發者ID:CypherCove,項目名稱:gdx-cclibs,代碼行數:7,代碼來源:RandomXS128Serializer.java

示例6: read

import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public MastershipBasedTimestamp read(Kryo kryo, Input input, Class<MastershipBasedTimestamp> type) {
    final long term = input.readLong();
    final long sequence = input.readLong();
    return new MastershipBasedTimestamp(term, sequence);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:7,代碼來源:MastershipBasedTimestampSerializer.java

示例7: read

import com.esotericsoftware.kryo.io.Input; //導入方法依賴的package包/類
@Override
public MastershipTerm read(Kryo kryo, Input input, Class<MastershipTerm> type) {
    final NodeId node = (NodeId) kryo.readClassAndObject(input);
    final long term = input.readLong();
    return MastershipTerm.of(node, term);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:7,代碼來源:MastershipTermSerializer.java


注:本文中的com.esotericsoftware.kryo.io.Input.readLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。