/** * 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; } }
/** * 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(); } }
public void write(String str, int offset, int count) throws IOException { synchronized (lock) { checkNotClosed(); if (count <= 0) { return;
public void write(char[] buffer, int offset, int count) throws IOException { synchronized (lock) { checkNotClosed(); if (buffer == null) { throw new NullPointerException("buffer == null");
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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; } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
public void write(char[] buffer, int offset, int count) throws IOException { synchronized (lock) { checkNotClosed(); if (buffer == null) { throw new NullPointerException("buffer == null");
public void write(char[] buffer, int offset, int count) throws IOException { synchronized (lock) { checkNotClosed(); if (buffer == null) { throw new NullPointerException("buffer == null");