本文整理匯總了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);
}