Interface SimpleWriter

All Known Implementing Classes:
BufferSimpleWriter

public interface SimpleWriter
A simple writer interface.

Similar to a subset from Writer, but with newLine() method added, similar to BufferedWriter.newLine() but with the difference that the newline not necessarily uses the line.separator system property and instead may target another system.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Write a newline according to the characteristics of the target platform.
    void
    write(char c)
    Write a character.
    void
    write(char[] cbuf, int off, int len)
    Write a sequence of characters from an array.
    void
    write(int num)
    Write an integer.
    void
    Write a character sequence.
  • Method Details

    • newLine

      void newLine() throws IOException
      Write a newline according to the characteristics of the target platform.
      Throws:
      IOException - if an error happens when writing.
    • write

      void write(CharSequence seq) throws IOException
      Write a character sequence.
      Parameters:
      seq - the CharSequence.
      Throws:
      IOException - if an error happens when writing.
    • write

      void write(char[] cbuf, int off, int len) throws IOException
      Write a sequence of characters from an array.
      Parameters:
      cbuf - the character array.
      off - the offset to start writing.
      len - the number of characters to write from the array.
      Throws:
      IOException - if an error happens when writing.
    • write

      void write(char c) throws IOException
      Write a character.
      Parameters:
      c - the character.
      Throws:
      IOException - if an error happens when writing.
    • write

      void write(int num) throws IOException
      Write an integer.
      Parameters:
      num - the integer number.
      Throws:
      IOException - if an error happens when writing.