本文整理了Java中java.io.ObjectOutputStream.drain()
方法的一些代码示例,展示了ObjectOutputStream.drain()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.drain()
方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:drain
[英]Writes buffered data to the target stream. This is similar to flush but the flush is not propagated to the target stream.
[中]将缓冲数据写入目标流。这类似于刷新,但刷新不会传播到目标流。
代码示例来源:origin: robovm/robovm
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: robovm/robovm
/**
* Resets the state of this stream. A marker is written to the stream, so
* that the corresponding input stream will also perform a reset at the same
* point. Objects previously written are no longer remembered, so they will
* be written again (instead of a cyclical reference) if found in the object
* graph.
*
* @throws IOException
* if {@code reset()} is called during the serialization of an
* object.
*/
public void reset() throws IOException {
// First we flush what we have
drain();
/*
* And dump a reset marker, so that the ObjectInputStream can reset
* itself at the same point
*/
output.writeByte(TC_RESET);
// Now we reset ourselves
resetState();
}
代码示例来源:origin: robovm/robovm
drain();
output.writeByte(TC_ENDBLOCKDATA);
} else {
代码示例来源:origin: robovm/robovm
drain();
代码示例来源:origin: robovm/robovm
drain();
output.writeByte(TC_ENDBLOCKDATA);
代码示例来源:origin: robovm/robovm
drain(); // flush primitive types in the annotation
output.writeByte(TC_ENDBLOCKDATA);
writeClassDesc(classDesc.getSuperclass(), unshared);
代码示例来源:origin: robovm/robovm
drain(); // flush primitive types in the annotation
output.writeByte(TC_ENDBLOCKDATA);
代码示例来源:origin: org.cojen/dirmi
@Override
public void drain() throws IOException {
super.drain();
}
}
代码示例来源:origin: au.net.zeus.jgdms/jgdms-platform
@Override
public void drain() throws IOException {
super.drain();
}
代码示例来源:origin: MobiVM/robovm
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: ibinti/bugvm
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Writes buffered data to the target stream and calls the {@code flush}
* method of the target stream.
*
* @throws IOException
* if an error occurs while writing to or flushing the output
* stream.
*/
@Override
public void flush() throws IOException {
drain();
output.flush();
}
代码示例来源:origin: ibinti/bugvm
/**
* Resets the state of this stream. A marker is written to the stream, so
* that the corresponding input stream will also perform a reset at the same
* point. Objects previously written are no longer remembered, so they will
* be written again (instead of a cyclical reference) if found in the object
* graph.
*
* @throws IOException
* if {@code reset()} is called during the serialization of an
* object.
*/
public void reset() throws IOException {
// First we flush what we have
drain();
/*
* And dump a reset marker, so that the ObjectInputStream can reset
* itself at the same point
*/
output.writeByte(TC_RESET);
// Now we reset ourselves
resetState();
}
代码示例来源:origin: MobiVM/robovm
/**
* Resets the state of this stream. A marker is written to the stream, so
* that the corresponding input stream will also perform a reset at the same
* point. Objects previously written are no longer remembered, so they will
* be written again (instead of a cyclical reference) if found in the object
* graph.
*
* @throws IOException
* if {@code reset()} is called during the serialization of an
* object.
*/
public void reset() throws IOException {
// First we flush what we have
drain();
/*
* And dump a reset marker, so that the ObjectInputStream can reset
* itself at the same point
*/
output.writeByte(TC_RESET);
// Now we reset ourselves
resetState();
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Resets the state of this stream. A marker is written to the stream, so
* that the corresponding input stream will also perform a reset at the same
* point. Objects previously written are no longer remembered, so they will
* be written again (instead of a cyclical reference) if found in the object
* graph.
*
* @throws IOException
* if {@code reset()} is called during the serialization of an
* object.
*/
public void reset() throws IOException {
// First we flush what we have
drain();
/*
* And dump a reset marker, so that the ObjectInputStream can reset
* itself at the same point
*/
output.writeByte(TC_RESET);
// Now we reset ourselves
resetState();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Resets the state of this stream. A marker is written to the stream, so
* that the corresponding input stream will also perform a reset at the same
* point. Objects previously written are no longer remembered, so they will
* be written again (instead of a cyclical reference) if found in the object
* graph.
*
* @throws IOException
* if {@code reset()} is called during the serialization of an
* object.
*/
public void reset() throws IOException {
// First we flush what we have
drain();
/*
* And dump a reset marker, so that the ObjectInputStream can reset
* itself at the same point
*/
output.writeByte(TC_RESET);
// Now we reset ourselves
resetState();
}
内容来源于网络,如有侵权,请联系作者删除!