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


Java Output.writeString方法代碼示例

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


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

示例1: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public final void write (Kryo kryo, Output output) {
    if (currentReadWriteVersion == -1)
        throw new RuntimeException("currentReadWriteVersion must be set before writing.");
    if (currentReadWriteVersion < 0 || minimumReadVersion < 0)
        throw new RuntimeException("currentReadWriteVersion and minimumReadVersion must not be less than 0.");
    if (currentReadWriteVersion < minimumReadVersion)
        throw new RuntimeException("currentReadWriteVersion cannot be lower than minimumReadVersion");

    Class type = data == null ? null : data.getClass();
    pushHeader(kryo, this);
    output.writeInt(GRAPH_HEADER_VERSION, true);
    kryo.writeClass(output, type);
    output.writeInt(Version.MAJOR, true);
    output.writeInt(Version.MINOR, true);
    output.writeInt(Version.REVISION, true);
    output.writeInt(currentReadWriteVersion, true);
    output.writeInt(minimumReadVersion, true);
    output.writeString(minimumReadVersionString);
    output.writeBoolean(useCompactColor);
    output.writeBoolean(includePixmapDrawingParams);
    writeExtra(kryo, output);
    if (data != null)
        kryo.writeObject(output, data);
    popHeader(kryo);
}
 
開發者ID:CypherCove,項目名稱:gdx-cclibs,代碼行數:27,代碼來源:GraphHeader.java

示例2: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Float> object) {
    try {
        List<Map<String, Float>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Float> mapData = mapDataList.get(i);
            for (Map.Entry<String, Float> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeFloat(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:FloatOperand.java

示例3: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, ArrayMetaData<String[]> object) {
    try {
        String[] arrData = arrayMetaData.getArrData();
        arrayMetaData.send(output);
        int arrSegNum = arrayMetaData.getSegNum();
        for (int i = 0; i < arrSegNum; i++) {
            int from = arrayMetaData.getFrom(i);
            int to = arrayMetaData.getTo(i);
            for (int j = from; j < to; j++) {
                output.writeString(arrData[j]);
            }
        }
    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:18,代碼來源:StringOperand.java

示例4: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<T> object) {
    try {
        List<Map<String, T>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, T> mapData = mapDataList.get(i);
            for (Map.Entry<String, T> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                serializer.write(kryo, output, entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:ObjectOperand.java

示例5: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Double> object) {
    try {
        List<Map<String, Double>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Double> mapData = mapDataList.get(i);
            for (Map.Entry<String, Double> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeDouble(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:DoubleOperand.java

示例6: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Short> object) {
    try {
        List<Map<String, Short>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Short> mapData = mapDataList.get(i);
            for (Map.Entry<String, Short> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeShort(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:ShortOperand.java

示例7: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Long> object) {
    try {
        List<Map<String, Long>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Long> mapData = mapDataList.get(i);
            for (Map.Entry<String, Long> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeLong(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:LongOperand.java

示例8: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Integer> object) {
    try {
        List<Map<String, Integer>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Integer> mapData = mapDataList.get(i);
            for (Map.Entry<String, Integer> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeInt(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:IntOperand.java

示例9: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
public void write(Kryo kryo, Output output, MapMetaData<Byte> object) {
    try {
        List<Map<String, Byte>> mapDataList = mapMetaData.getMapDataList();
        mapMetaData.send(output);
        int mapSegNum = mapMetaData.getSegNum();
        for (int i = 0; i < mapSegNum; i++) {
            Map<String, Byte> mapData = mapDataList.get(i);
            for (Map.Entry<String, Byte> entry : mapData.entrySet()) {
                output.writeString(entry.getKey());
                output.writeByte(entry.getValue());
            }
            if (mapMetaData.getCollective() == Collective.GATHER ||
                    mapMetaData.getCollective() == Collective.SCATTER ||
                    mapMetaData.getCollective() == Collective.REDUCE_SCATTER) {
                mapData.clear();
            }
        }

    } catch (IOException e) {
        LOG.error("double array write exception", e);
        System.exit(1);
    }
}
 
開發者ID:yuantiku,項目名稱:ytk-mp4j,代碼行數:24,代碼來源:ByteOperand.java

示例10: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public void write(Kryo kryo, Output output, PortNumber object) {
    output.writeBoolean(object.hasName());
    output.writeLong(object.toLong());
    if (object.hasName()) {
        output.writeString(object.name());
    }
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:9,代碼來源:PortNumberSerializer.java

示例11: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public void write(Kryo kryo, Output output, ProviderId object) {
    output.writeString(object.scheme());
    output.writeString(object.id());
    output.writeBoolean(object.isAncillary());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:7,代碼來源:ProviderIdSerializer.java

示例12: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public void write(Kryo kryo, Output output, NodeId object) {
    output.writeString(object.toString());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:5,代碼來源:NodeIdSerializer.java

示例13: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public void write(Kryo kryo, Output output, DeviceId object) {
    output.writeString(object.toString());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:5,代碼來源:DeviceIdSerializer.java

示例14: write

import com.esotericsoftware.kryo.io.Output; //導入方法依賴的package包/類
@Override
public void write(Kryo kryo, Output output, URI object) {
    output.writeString(object.toString());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:5,代碼來源:UriSerializer.java


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