热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.esotericsoftware.kryo.io.Output.writeShort()方法的使用及代码示例

本文整理了Java中com.esotericsoftware.kryo.io.Output.writeShort()方法的一些代码示例,展示了Output.

本文整理了Java中com.esotericsoftware.kryo.io.Output.writeShort()方法的一些代码示例,展示了Output.writeShort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.writeShort()方法的具体详情如下:
包路径:com.esotericsoftware.kryo.io.Output
类名称:Output
方法名:writeShort

Output.writeShort介绍

[英]Writes a 2 byte short. Uses BIG_ENDIAN byte order.
[中]写入一个2字节的短字符。使用BIG_ENDIAN字节顺序。

代码示例

代码示例来源:origin: apache/incubator-dubbo

@Override
public void writeShort(short v) throws IOException {
output.writeShort(v);
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void writeShort(short v) throws IOException {
output.writeShort(v);
}

代码示例来源:origin: apache/flink

@Override
public void write(Kryo kryo, Output output, PyLong object) {
byte[] data = object.getValue().toByteArray();
output.writeShort(data.length);
output.writeBytes(data);
}

代码示例来源:origin: apache/tinkerpop

@Override
public void writeShort(int s) {
unshadedOutput.writeShort(s);
}

代码示例来源:origin: apache/metron

@Override
public void write(Kryo kryo, Output output) {
int numVariableMappings = variableMappings.isEmpty()?0:variableMappings.size();
output.writeShort(numVariableMappings);
for(Map m : variableMappings) {
byte[] b = m == null?new byte[]{}:SerDeUtils.toBytes(m);
output.writeInt(b.length);
if(b.length > 0) {
output.writeBytes(b);
}
}
}

代码示例来源:origin: com.esotericsoftware/kryo

/** Bulk output of a short array. */
public void writeShorts (short[] object) throws KryoException {
for (int i = 0, n = object.length; i writeShort(object[i]);
}

代码示例来源:origin: com.esotericsoftware.kryo/kryo

/** Bulk output of a short array. */
public void writeShorts (short[] object) throws KryoException {
for (int i = 0, n = object.length; i writeShort(object[i]);
}

代码示例来源:origin: svn2github/kryo

/** Bulk output of a short array. */
public void writeShorts (short[] object) throws KryoException {
for (int i = 0, n = object.length; i writeShort(object[i]);
}

代码示例来源:origin: com.esotericsoftware/kryo-shaded

/** Bulk output of a short array. */
public void writeShorts (short[] object) throws KryoException {
for (int i = 0, n = object.length; i writeShort(object[i]);
}

代码示例来源:origin: com.esotericsoftware/kryo

public void writeShort (int v) throws IOException {
output.writeShort(v);
}

代码示例来源:origin: junkdog/artemis-odb

@Override
public void write (Kryo kryo, Output output, SaveFileFormat.ComponentIdentifiers ci) {
int count = 0;
for (Map.Entry> entry : ci.idToType.entrySet()) {
count++;
}
output.writeShort(count);
for (Map.Entry> entry : ci.idToType.entrySet()) {
output.writeShort(entry.getKey().intValue());
output.writeString(entry.getValue().getName());
}
}

代码示例来源:origin: net.onedaybeard.artemis/artemis-odb-serializer-kryo

@Override
public void write (Kryo kryo, Output output, SaveFileFormat.ComponentIdentifiers ci) {
int count = 0;
for (Map.Entry> entry : ci.idToType.entrySet()) {
count++;
}
output.writeShort(count);
for (Map.Entry> entry : ci.idToType.entrySet()) {
output.writeShort(entry.getKey().intValue());
output.writeString(entry.getValue().getName());
}
}

代码示例来源:origin: junkdog/artemis-odb

@Override
public void write (Kryo kryo, Output output, ArchetypeMapper.TransmuterEntry te) {
int count = te.componentTypes.size();
output.writeInt(count);
for (int i = 0; i Class type = te.componentTypes.get(i);
int index = identifiers.typeToId.get(type);
output.writeShort(index);
}
}

代码示例来源:origin: com.esotericsoftware/kryo

public void write (Output output, Object object) {
output.writeShort(unsafe().getShort(object, offset));
}

代码示例来源:origin: net.onedaybeard.artemis/artemis-odb-serializer-kryo

@Override
public void write (Kryo kryo, Output output, ArchetypeMapper.TransmuterEntry te) {
int count = te.componentTypes.size();
output.writeInt(count);
for (int i = 0; i Class type = te.componentTypes.get(i);
int index = identifiers.typeToId.get(type);
output.writeShort(index);
}
}

代码示例来源:origin: com.esotericsoftware/kryo

public void write (Output output, Object object) {
try {
output.writeShort(field.getShort(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}

代码示例来源:origin: com.esotericsoftware.kryo/kryo

public void write (Output output, Object object) {
try {
output.writeShort(field.getShort(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}

代码示例来源:origin: com.esotericsoftware/kryo-shaded

public void write (Output output, Object object) {
try {
output.writeShort(field.getShort(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}

代码示例来源:origin: org.scray/scray-client-jdbc

@Override
public void write(Kryo k, Output o, JavaSimpleRow v) {
o.writeShort(v.getColumns().size());
for (JavaRowColumn rowcol : v.getColumns()) {
k.writeObject(o, rowcol);
}
}

代码示例来源:origin: org.onosproject/onos-core-serializers

@Override
public void write(Kryo kryo, Output output, DefaultApplicationId object) {
output.writeShort(object.id());
output.writeString(object.name());
}

推荐阅读
author-avatar
w3shuajiang2
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有