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

x33g5p2x  于2022-01-25 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(100)

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

Output.writeAscii介绍

[英]Writes a string that is known to contain only ASCII characters. Non-ASCII strings passed to this method will be corrupted. Each byte is a 7 bit character with the remaining byte denoting if another character is available. This is slightly more efficient than #writeString(String). The string can be read using Input#readString() or Input#readStringBuilder().
[中]写入只包含ASCII字符的字符串。传递给此方法的非ASCII字符串将被损坏。每个字节是一个7位字符,剩余字节表示是否有其他字符可用。这比#writeString(String)稍微高效一些。可以使用Input#readString()或Input#readStringBuilder()读取字符串。

代码示例

代码示例来源:origin: de.javakaffee/kryo-serializers

/**
 * {@inheritDoc}
 */
@Override
public void write(final Kryo kryo, final Output output, final UnicodeBlock obj) {
  output.writeAscii(BLOCK_NAMES.get(obj));
}

代码示例来源:origin: magro/kryo-serializers

/**
 * {@inheritDoc}
 */
@Override
public void write(final Kryo kryo, final Output output, final UnicodeBlock obj) {
  output.writeAscii(BLOCK_NAMES.get(obj));
}

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

public void write (Kryo kryo, Output output, Locale l) {
  output.writeAscii(l.getLanguage());
  output.writeAscii(l.getCountry());
  output.writeString(l.getVariant());
}

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

public void write (Kryo kryo, Output output, Locale l) {
  output.writeAscii(l.getLanguage());
  output.writeAscii(l.getCountry());
  output.writeString(l.getVariant());
}

代码示例来源:origin: usc-cloud/goffish

@Override
  public void write(Kryo kryo, Output output, PartitionSlice.PropertyTuple object) {
    output.writeAscii(object.Name);
    output.writeAscii(object.Type.getName());
    output.writeBoolean(object.IsStatic);
    kryo.writeClassAndObject(output, object.DefaultValues);
  }
}

相关文章