本文整理汇总了Java中com.esotericsoftware.kryo.io.Input.readString方法的典型用法代码示例。如果您正苦于以下问题:Java Input.readString方法的具体用法?Java Input.readString怎么用?Java Input.readString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.esotericsoftware.kryo.io.Input
的用法示例。
在下文中一共展示了Input.readString方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<Float> read(Kryo kryo, Input input, Class<MapMetaData<Float>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Float>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, Float> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Float val = input.readFloat();
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例3: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public ArrayMetaData<String[]> read(Kryo kryo, Input input, Class<ArrayMetaData<String[]>> type) {
try {
String[] 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.readString();
}
}
thatArrMetaData.setArrData(arrData);
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatArrMetaData;
}
示例4: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<T> read(Kryo kryo, Input input, Class<MapMetaData<T>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, T>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, T> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
T val = serializer.read(kryo, input, this.type);
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例5: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<Short> read(Kryo kryo, Input input, Class<MapMetaData<Short>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Short>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, Short> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Short val = input.readShort();
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例6: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<Long> read(Kryo kryo, Input input, Class<MapMetaData<Long>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Long>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, Long> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Long val = input.readLong();
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例7: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<Integer> read(Kryo kryo, Input input, Class<MapMetaData<Integer>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Integer>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, Integer> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Integer val = input.readInt();
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例8: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public MapMetaData<Byte> read(Kryo kryo, Input input, Class<MapMetaData<Byte>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Byte>> mapDataList = new ArrayList<>(thatMapSegNum);
thatMapMetaData.setMapDataList(mapDataList);
for (int i = 0; i < thatMapSegNum; i++) {
int dataNum = thatMapMetaData.getDataNum(i);
Map<String, Byte> mapData = new HashMap<>(dataNum);
mapDataList.add(mapData);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Byte val = input.readByte();
mapData.put(key, val);
}
}
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例9: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public ProviderId read(Kryo kryo, Input input, Class<ProviderId> type) {
String scheme = input.readString();
String id = input.readString();
boolean isAncillary = input.readBoolean();
return new ProviderId(scheme, id, isAncillary);
}
示例10: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
public MapMetaData<Double> read(Kryo kryo, Input input, Class<MapMetaData<Double>> type) {
try {
thatMapMetaData = mapMetaData.recv(input);
int thatMapSegNum = thatMapMetaData.getSegNum();
List<Map<String, Double>> thatMapListData = new ArrayList<>(thatMapSegNum);
List<Integer> thatDataNums = new ArrayList<>(thatMapSegNum);
for (int i = 0; i < thatMapSegNum; i++) {
Map<String, Double> thisMapData = mapMetaData.getMapDataList().get(i);
int dataNum = thatMapMetaData.getDataNum(i);
for (int j = 0; j < dataNum; j++) {
String key = input.readString();
Double val = input.readDouble();
Double thisVal = thisMapData.get(key);
if (thisVal == null) {
thisMapData.put(key, val);
} else {
thisMapData.put(key, operator.apply(thisVal, val));
}
}
thatMapListData.add(thisMapData);
thatDataNums.add(thisMapData.size());
}
thatMapMetaData.setMapDataList(thatMapListData);
thatMapMetaData.setDataNums(thatDataNums);
} catch (IOException e) {
LOG.error("double array read exception", e);
System.exit(1);
}
return thatMapMetaData;
}
示例11: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public NodeId read(Kryo kryo, Input input, Class<NodeId> type) {
final String id = input.readString();
return new NodeId(id);
}
示例12: read
import com.esotericsoftware.kryo.io.Input; //导入方法依赖的package包/类
@Override
public DeviceId read(Kryo kryo, Input input, Class<DeviceId> type) {
final String str = input.readString();
return DeviceId.deviceId(str);
}