本文整理匯總了Java中java.io.ObjectInputStream.readChar方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectInputStream.readChar方法的具體用法?Java ObjectInputStream.readChar怎麽用?Java ObjectInputStream.readChar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.io.ObjectInputStream
的用法示例。
在下文中一共展示了ObjectInputStream.readChar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doReps
import java.io.ObjectInputStream; //導入方法依賴的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: readObject
import java.io.ObjectInputStream; //導入方法依賴的package包/類
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
z = in.readBoolean();
b = in.readByte();
c = in.readChar();
s = in.readShort();
i = in.readInt();
f = in.readFloat();
j = in.readLong();
d = in.readDouble();
str = (String) in.readObject();
parent = in.readObject();
left = in.readObject();
right = in.readObject();
}
示例3: readObject
import java.io.ObjectInputStream; //導入方法依賴的package包/類
void readObject(ObjectInputStream in) throws IOException {
methodId = in.readChar();
}