本文整理匯總了Java中java.io.ObjectOutputStream.writeChar方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectOutputStream.writeChar方法的具體用法?Java ObjectOutputStream.writeChar怎麽用?Java ObjectOutputStream.writeChar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.io.ObjectOutputStream
的用法示例。
在下文中一共展示了ObjectOutputStream.writeChar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doReps
import java.io.ObjectOutputStream; //導入方法依賴的package包/類
/**
* Run benchmark for given number of batches, with given number of cycles
* for each batch.
*/
void doReps(ObjectOutputStream oout, ObjectInputStream oin,
StreamBuffer sbuf, int nbatches, int ncycles)
throws Exception
{
for (int i = 0; i < nbatches; i++) {
sbuf.reset();
for (int j = 0; j < ncycles; j++) {
oout.writeChar('0');
}
oout.flush();
for (int j = 0; j < ncycles; j++) {
oin.readChar();
}
}
}
示例2: writeObject
import java.io.ObjectOutputStream; //導入方法依賴的package包/類
private void writeObject(ObjectOutputStream out) throws IOException {
out.writeBoolean(z);
out.writeByte(b);
out.writeChar(c);
out.writeShort(s);
out.writeInt(i);
out.writeFloat(f);
out.writeLong(j);
out.writeDouble(d);
out.writeObject(str);
out.writeObject(parent);
out.writeObject(left);
out.writeObject(right);
}
示例3: writeObject
import java.io.ObjectOutputStream; //導入方法依賴的package包/類
void writeObject(ObjectOutputStream out) throws IOException {
out.writeChar(methodId);
}