當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。