本文整理了Java中com.esotericsoftware.kryo.io.Output.writeBoolean()
方法的一些代码示例,展示了Output.writeBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.writeBoolean()
方法的具体详情如下:
包路径:com.esotericsoftware.kryo.io.Output
类名称:Output
方法名:writeBoolean
[英]Writes a 1 byte boolean.
[中]写入一个1字节的布尔值。
代码示例来源:origin: apache/incubator-dubbo
@Override
public void writeBool(boolean v) throws IOException {
output.writeBoolean(v);
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void writeBool(boolean v) throws IOException {
output.writeBoolean(v);
}
代码示例来源:origin: apache/flink
@Override
public void write(Kryo kryo, Output output, PyBoolean object) {
output.writeBoolean(object.getBooleanValue());
}
代码示例来源:origin: apache/kylin
@Override
public void write(final Kryo kryo, final Output output, final BitSet bitSet) {
final int len = bitSet.length();
output.writeInt(len, true);
for (int i = 0; i < len; i++) {
output.writeBoolean(bitSet.get(i));
}
}
代码示例来源:origin: apache/tinkerpop
@Override
public void writeBoolean(final boolean b) {
unshadedOutput.writeBoolean(b);
}
代码示例来源:origin: alibaba/jstorm
output.writeInt(((TupleExt) tuple).getTargetTaskId());
output.writeLong(((TupleExt) tuple).getCreationTimeStamp());
output.writeBoolean(((TupleExt) tuple).isBatchTuple());
isBatchTuple = ((TupleExt) tuple).isBatchTuple();
代码示例来源:origin: magro/memcached-session-manager
@Override
public void write(Kryo kryo, Output output, User user) {
output.writeString(user.getPassword());
output.writeString(user.getUsername());
final Collection<GrantedAuthority> authorities = user.getAuthorities();
output.writeInt(authorities.size(), true);
for (final GrantedAuthority item : authorities) {
_kryo.writeClassAndObject(output, item);
}
output.writeBoolean(user.isAccountNonExpired());
output.writeBoolean(user.isAccountNonLocked());
output.writeBoolean(user.isCredentialsNonExpired());
output.writeBoolean(user.isEnabled());
}
代码示例来源:origin: caskdata/cdap
@Override
public Encoder writeBool(boolean b) throws IOException {
output.writeBoolean(b);
return this;
}
代码示例来源:origin: cdapio/cdap
@Override
public Encoder writeBool(boolean b) throws IOException {
output.writeBoolean(b);
return this;
}
代码示例来源:origin: davidmoten/rtree
private void write(Kryo kryo, Output output, RTree<T, S> tree) {
writeContext(tree.context(), output);
output.writeBoolean(tree.root().isPresent());
output.writeInt(tree.size());
if (tree.root().isPresent()) {
writeNode(tree.root().get(), output);
}
}
代码示例来源:origin: davidmoten/rtree
private void writeBounds(Output output, Rectangle mbr) {
output.writeBoolean(mbr.isDoublePrecision());
if (mbr.isDoublePrecision()) {
output.writeDouble(mbr.x1());
output.writeDouble(mbr.y1());
output.writeDouble(mbr.y1());
output.writeDouble(mbr.y2());
} else {
output.writeFloat((float) mbr.x1());
output.writeFloat((float) mbr.y1());
output.writeFloat((float) mbr.y1());
output.writeFloat((float) mbr.y2());
}
}
代码示例来源:origin: de.javakaffee/kryo-serializers
@Override
public void write(final Kryo kryo, final Output output, final BitSet bitSet) {
final int len = bitSet.length();
output.writeInt(len, true);
for(int i = 0; i < len; i++) {
output.writeBoolean(bitSet.get(i));
}
}
代码示例来源:origin: davidmoten/rtree
private void writeNode(Node<T, S> node, Output output) {
boolean isLeaf = node instanceof Leaf;
output.writeBoolean(isLeaf);
if (isLeaf) {
Leaf<T, S> leaf = (Leaf<T, S>) node;
writeBounds(output, leaf.geometry().mbr());
output.writeInt(leaf.count());
for (Entry<T, S> entry : leaf.entries()) {
S g = entry.geometry();
writeValue(output, entry.value());
writeGeometry(output, g);
}
} else {
NonLeaf<T, S> nonLeaf = (NonLeaf<T, S>) node;
writeBounds(output, nonLeaf.geometry().mbr());
output.writeInt(nonLeaf.count());
for (Node<T, S> nd : nonLeaf.children()) {
writeNode(nd, output);
}
}
}
代码示例来源:origin: com.esotericsoftware/kryo
public void write (Output output, Object object) {
try {
output.writeBoolean(field.getBoolean(object));
} catch (Exception e) {
KryoException ex = new KryoException(e);
ex.addTrace(this + " (" + type.getName() + ")");
throw ex;
}
}
代码示例来源:origin: com.esotericsoftware/kryo
public void write (Kryo kryo, Output output, boolean[] object) {
if (object == null) {
output.writeVarInt(NULL, true);
return;
}
output.writeVarInt(object.length + 1, true);
for (int i = 0, n = object.length; i < n; i++)
output.writeBoolean(object[i]);
}
代码示例来源:origin: com.esotericsoftware/kryo
public void write (Kryo kryo, Output output, Calendar object) {
timeZoneSerializer.write(kryo, output, object.getTimeZone()); // can't be null
output.writeLong(object.getTimeInMillis(), true);
output.writeBoolean(object.isLenient());
output.writeInt(object.getFirstDayOfWeek(), true);
output.writeInt(object.getMinimalDaysInFirstWeek(), true);
if (object instanceof GregorianCalendar)
output.writeLong(((GregorianCalendar)object).getGregorianChange().getTime(), false);
else
output.writeLong(DEFAULT_GREGORIAN_CUTOVER, false);
}
代码示例来源:origin: org.onosproject/onos-core-serializers
@Override
public void write(Kryo kryo, Output output, ProviderId object) {
output.writeString(object.scheme());
output.writeString(object.id());
output.writeBoolean(object.isAncillary());
}
代码示例来源:origin: apache/incubator-samoa
@Override
public void write(Kryo kryo, Output output, AttributeContentEvent event) {
output.writeLong(event.learningNodeId, true);
output.writeInt(event.obsIndex, true);
output.writeDouble(event.attrVal, PRECISION, true);
output.writeInt(event.classVal, true);
output.writeDouble(event.weight, PRECISION, true);
output.writeBoolean(event.isNominal);
}
代码示例来源:origin: DataSystemsLab/GeoSpark
@Override
public void write(Kryo kryo, Output output, Pixel object)
{
log.debug("Serializing Pixel...");
output.writeInt(object.getX());
output.writeInt(object.getY());
output.writeInt(object.getResolutionX());
output.writeInt(object.getResolutionY());
output.writeBoolean(object.isDuplicate());
output.writeInt(object.getCurrentPartitionId());
}
代码示例来源:origin: org.onosproject/onos-core-serializers
@Override
public void write(Kryo kryo, Output output, DefaultPort object) {
kryo.writeClassAndObject(output, object.element());
kryo.writeObject(output, object.number());
output.writeBoolean(object.isEnabled());
kryo.writeObject(output, object.type());
output.writeLong(object.portSpeed());
kryo.writeClassAndObject(output, object.annotations());
}
内容来源于网络,如有侵权,请联系作者删除!