当前位置: 首页>>代码示例>>Java>>正文


Java DataOutput.writeChar方法代码示例

本文整理汇总了Java中java.io.DataOutput.writeChar方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutput.writeChar方法的具体用法?Java DataOutput.writeChar怎么用?Java DataOutput.writeChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.DataOutput的用法示例。


在下文中一共展示了DataOutput.writeChar方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeCharArray

import java.io.DataOutput; //导入方法依赖的package包/类
/**
 * Writes given number of characters from array of <code>char</code>s to a
 * <code>DataOutput</code>.
 * 
 * @throws IOException A problem occurs while writing to <code>out</code>
 * 
 * @see DataSerializer#readCharArray
 * @since GemFire 6.6
 */
public static void writeCharArray(char[] array, int length, DataOutput out) throws IOException {

  checkOut(out);

  if (array == null) {
    length = -1;
  }
  writeArrayLength(length, out);
  if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
    logger.trace(LogMarker.SERIALIZER, "Writing char array of length {}", length);
  }
  if (length > 0) {
    for (int i = 0; i < length; i++) {
      out.writeChar(array[i]);
    }
  }
}
 
开发者ID:ampool,项目名称:monarch,代码行数:27,代码来源:InternalDataSerializer.java

示例2: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
    out.writeBoolean(false);
    out.writeChar('O');
    super.write(out);

    out.writeInt(neuron.id);

    out.writeInt(parents.size());
    for(Map.Entry<Integer, TreeSet<Provider<Node>>> me: parents.entrySet()) {
        out.writeInt(me.getKey());
        out.writeInt(me.getValue().size());
        for(Provider<Node> pn: me.getValue()) {
            out.writeInt(pn.id);
        }
    }
}
 
开发者ID:aika-algorithm,项目名称:aika,代码行数:18,代码来源:OrNode.java

示例3: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput stream) throws Exception{
    stream.writeInt(this.data.length());

    for(char c : this.data.toCharArray()){
        stream.writeChar(c);
    }
}
 
开发者ID:RockBottomGame,项目名称:API,代码行数:9,代码来源:PartString.java

示例4: writeCharacter

import java.io.DataOutput; //导入方法依赖的package包/类
/**
 * Writes an instance of <code>Character</code> to a <code>DataOutput</code>.
 *
 * @throws IOException A problem occurs while writing to <code>out</code>
 * @throws NullPointerException if value is null.
 *
 * @see #readCharacter
 */
public static void writeCharacter(Character value, DataOutput out) throws IOException {

  InternalDataSerializer.checkOut(out);

  if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
    logger.trace(LogMarker.SERIALIZER, "Writing Character {}", value);
  }

  out.writeChar(value.charValue());
}
 
开发者ID:ampool,项目名称:monarch,代码行数:19,代码来源:DataSerializer.java

示例5: writePrimitiveChar

import java.io.DataOutput; //导入方法依赖的package包/类
/**
 * Writes a primitive <code>char</code> to a <code>DataOutput</code>.
 *
 * @throws IOException A problem occurs while writing to <code>out</code>
 *
 * @see DataOutput#writeChar
 * @since GemFire 5.1
 */
public static void writePrimitiveChar(char value, DataOutput out) throws IOException {

  InternalDataSerializer.checkOut(out);

  if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
    logger.trace(LogMarker.SERIALIZER, "Writing Char {}", value);
  }

  out.writeChar(value);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:19,代码来源:DataSerializer.java

示例6: write

import java.io.DataOutput; //导入方法依赖的package包/类
/** Write ArithmeticProgression to DataOutput */
private static void write(ArithmeticProgression ap, DataOutput out
    ) throws IOException {
  out.writeChar(ap.symbol);
  out.writeLong(ap.value);
  out.writeLong(ap.delta);
  out.writeLong(ap.limit);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:SummationWritable.java

示例7: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
    out.writeBoolean(false);
    out.writeChar('A');
    super.write(out);

    out.writeInt(parents.size());
    for(Map.Entry<Refinement, Provider<? extends Node>> me: parents.entrySet()) {
        me.getKey().write(out);
        out.writeInt(me.getValue().id);
    }
}
 
开发者ID:aika-algorithm,项目名称:aika,代码行数:13,代码来源:AndNode.java

示例8: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
    out.writeBoolean(false);
    out.writeChar('I');
    super.write(out);
    key.write(out);

    out.writeBoolean(inputNeuron != null);
    if (inputNeuron != null) {
        out.writeInt(inputNeuron.id);
    }
}
 
开发者ID:aika-algorithm,项目名称:aika,代码行数:13,代码来源:InputNode.java

示例9: writeCharArray

import java.io.DataOutput; //导入方法依赖的package包/类
private void writeCharArray(DataOutput out) throws IOException {
  char[] v = (char[]) value;
  for (int i = 0; i < length; i++)
    out.writeChar(v[i]);
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:6,代码来源:ArrayPrimitiveWritable.java

示例10: writeStream

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void writeStream(final DataOutput data,
        final Character value) throws IOException
{
    data.writeChar(value);
}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:7,代码来源:DataTypeList.java


注:本文中的java.io.DataOutput.writeChar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。