- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.spy.memcached.transcoders.WhalinV1Transcoder
类的一些代码示例,展示了WhalinV1Transcoder
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhalinV1Transcoder
类的具体详情如下:
包路径:net.spy.memcached.transcoders.WhalinV1Transcoder
类名称:WhalinV1Transcoder
[英]Handles old whalin (tested with v1.6) encoding: data type is in the first byte of the value.
[中]处理旧whalin(用v1.6测试)编码:数据类型位于值的第一个字节。
代码示例来源:origin: net.spy/spymemcached
private Float decodeFloat(byte[] in) {
assert in.length == 5 : "Wrong length for a float";
Integer l = decodeInteger(in);
return Float.valueOf(Float.intBitsToFloat(l.intValue()));
}
代码示例来源:origin: net.spy/spymemcached
private Integer decodeInteger(byte[] in) {
assert in.length == 5 : "Wrong length for an int";
return Integer.valueOf((int) decodeLong(in).longValue());
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
} else if (o instanceof StringBuffer) {
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
flags |= SERIALIZED;
代码示例来源:origin: net.spy/spymemcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
} else if (o instanceof StringBuffer) {
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
flags |= SERIALIZED;
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
代码示例来源:origin: naver/arcus-java-client
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
} else if (o instanceof StringBuffer) {
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
flags |= SERIALIZED;
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private Float decodeFloat(byte[] in) {
assert in.length == 5 : "Wrong length for a float";
Integer l = decodeInteger(in);
return Float.valueOf(Float.intBitsToFloat(l.intValue()));
}
代码示例来源:origin: net.spy/spymemcached
private Double decodeDouble(byte[] in) {
assert in.length == 9 : "Wrong length for a double";
Long l = decodeLong(in);
return Double.valueOf(Double.longBitsToDouble(l.longValue()));
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
private Character decodeCharacter(byte[] b) {
return Character.valueOf((char) decodeInteger(b).intValue());
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private Integer decodeInteger(byte[] in) {
assert in.length == 5 : "Wrong length for an int";
return Integer.valueOf((int) decodeLong(in).longValue());
}
代码示例来源:origin: net.spy/spymemcached
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
代码示例来源:origin: naver/arcus-java-client
private Float decodeFloat(byte[] in) {
assert in.length == 5 : "Wrong length for a float";
Integer l = decodeInteger(in);
return Float.valueOf(Float.intBitsToFloat(l.intValue()));
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
private Integer decodeInteger(byte[] in) {
assert in.length == 5 : "Wrong length for an int";
return Integer.valueOf((int) decodeLong(in).longValue());
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
int flags = 0;
if (o instanceof String) {
b = encodeW1String((String) o);
if (StringUtils.isJsonObject((String) o)) {
return new CachedData(flags, b, getMaxSize());
b = encodeStringBuffer((StringBuffer) o);
} else if (o instanceof StringBuilder) {
b = encodeStringbuilder((StringBuilder) o);
} else if (o instanceof Long) {
b = encodeLong((Long) o);
} else if (o instanceof Integer) {
b = encodeInteger((Integer) o);
} else if (o instanceof Short) {
b = encodeShort((Short) o);
} else if (o instanceof Boolean) {
b = encodeBoolean((Boolean) o);
} else if (o instanceof Date) {
b = encodeLong(((Date) o).getTime(), SPECIAL_DATE);
} else if (o instanceof Byte) {
b = encodeByte((Byte) o);
} else if (o instanceof Float) {
b = encodeFloat((Float) o);
} else if (o instanceof Double) {
b = encodeDouble((Double) o);
} else if (o instanceof Character) {
b = encodeCharacter((Character) o);
} else {
b = serialize(o);
代码示例来源:origin: naver/arcus-java-client
Object rv = null;
if ((d.getFlags() & COMPRESSED) != 0) {
data = decompress(d.getData());
rv = deserialize(data);
} else {
int f = data[0];
switch (f) {
case SPECIAL_BOOLEAN:
rv = decodeBoolean(data);
break;
case SPECIAL_INTEGER:
rv = decodeInteger(data);
break;
case SPECIAL_SHORT:
rv = decodeShort(data);
break;
case SPECIAL_LONG:
rv = decodeLong(data);
break;
case SPECIAL_DATE:
rv = new Date(decodeLong(data));
break;
case SPECIAL_BYTE:
rv = decodeByte(data);
break;
case SPECIAL_FLOAT:
rv = decodeFloat(data);
break;
我是一名优秀的程序员,十分优秀!