本文整理了Java中java.io.BufferedWriter.checkNotClosed()
方法的一些代码示例,展示了BufferedWriter.checkNotClosed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BufferedWriter.checkNotClosed()
方法的具体详情如下:
包路径:java.io.BufferedWriter
类名称:BufferedWriter
方法名:checkNotClosed
暂无
代码示例来源:origin: robovm/robovm
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: robovm/robovm
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: robovm/robovm
public void write(String str, int offset, int count) throws IOException {
synchronized (lock) {
checkNotClosed();
if (count <= 0) {
return;
代码示例来源:origin: robovm/robovm
public void write(char[] buffer, int offset, int count) throws IOException {
synchronized (lock) {
checkNotClosed();
if (buffer == null) {
throw new NullPointerException("buffer == null");
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Writes the character {@code oneChar} to this writer. If the buffer
* gets full by writing this character, this writer is flushed. Only the
* lower two bytes of the integer {@code oneChar} are written.
*
* @param oneChar
* the character to write.
* @throws IOException
* if this writer is closed or another I/O error occurs.
*/
@Override
public void write(int oneChar) throws IOException {
synchronized (lock) {
checkNotClosed();
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
pos = 0;
}
buf[pos++] = (char) oneChar;
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Flushes this writer. The contents of the buffer are committed to the
* target writer and it is then flushed.
*
* @throws IOException
* if an error occurs while flushing this writer.
*/
@Override
public void flush() throws IOException {
synchronized (lock) {
checkNotClosed();
flushInternal();
out.flush();
}
}
代码示例来源:origin: ibinti/bugvm
public void write(char[] buffer, int offset, int count) throws IOException {
synchronized (lock) {
checkNotClosed();
if (buffer == null) {
throw new NullPointerException("buffer == null");
代码示例来源:origin: com.jtransc/jtransc-rt
public void write(char[] buffer, int offset, int count) throws IOException {
synchronized (lock) {
checkNotClosed();
if (buffer == null) {
throw new NullPointerException("buffer == null");
内容来源于网络,如有侵权,请联系作者删除!