/*** * Writes a character array to the output. * * @param buffer The character array to write. * @throws IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(char[] buffer) throws IOException { write(buffer, 0, buffer.length); }
/*** * Writes a number of characters from a character array to the output * starting from a given offset. * * @param buffer The character array to write. * @param offset The offset into the array at which to start copying data. * @param length The number of characters to write. * @throws IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(char[] buffer, int offset, int length) throws IOException { synchronized (lock) { while (length-- > 0) { write(buffer[offset++]); } } }
/*** * Writes a String to the output. * * @param string The String to write. * @throws IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(String string) throws IOException { write(string.toCharArray()); }
/*** * Writes part of a String to the output starting from a given offset. * * @param string The String to write. * @param offset The offset into the String at which to start copying data. * @param length The number of characters to write. * @throws IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(String string, int offset, int length) throws IOException { write(string.toCharArray(), offset, length); }
/*** * Writes a character array to the output. * <p> * @param buffer The character array to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ public void write(char[] buffer) throws IOException { write(buffer, 0, buffer.length); }
/*** * Writes a character array to the output. * <p> * @param buffer The character array to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(char[] buffer) throws IOException { write(buffer, 0, buffer.length); }
/*** * Writes a number of characters from a character array to the output * starting from a given offset. * <p> * @param buffer The character array to write. * @param offset The offset into the array at which to start copying data. * @param length The number of characters to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(char[] buffer, int offset, int length) throws IOException { synchronized (lock) { while (length-- > 0) write(buffer[offset++]); } }
/*** * Writes a number of characters from a character array to the output * starting from a given offset. * <p> * @param buffer The character array to write. * @param offset The offset into the array at which to start copying data. * @param length The number of characters to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ public void write(char[] buffer, int offset, int length) throws IOException { synchronized (lock) { while (length-- > 0) write(buffer[offset++]); } }
/*** * Writes a String to the output. * <p> * @param string The String to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(String string) throws IOException { write(string.toCharArray()); }
/*** * Writes a String to the output. * <p> * @param string The String to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ public void write(String string) throws IOException { write(string.toCharArray()); }
/*** * Writes part of a String to the output starting from a given offset. * <p> * @param string The String to write. * @param offset The offset into the String at which to start copying data. * @param length The number of characters to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ public void write(String string, int offset, int length) throws IOException { write(string.toCharArray(), offset, length); }
/*** * Writes part of a String to the output starting from a given offset. * <p> * @param string The String to write. * @param offset The offset into the String at which to start copying data. * @param length The number of characters to write. * @exception IOException If an error occurs while writing to the underlying * output. ***/ @Override public void write(String string, int offset, int length) throws IOException { write(string.toCharArray(), offset, length); }