Interface SvetovidWriter

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractSvetovidWriter, DefaultSvetovidWriter, StandardSvetovidErrorWriter, StandardSvetovidWriter

public interface SvetovidWriter extends Closeable
This interface provides methods that simplify outputting data for beginner programmers. Exception handling is not necessary as it can be turned on or off by using setThrowingExceptions(boolean). Even when the exception throwing is turned off, if necessary, the last raised exception can be retrieved using getLastException() method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this writer and releases any resources associated with the underlying stream.
    boolean
    Returns whether this writer automatically flushes the underlying output stream and forces any buffered output bytes to be written out after every operation by calling printbf().
    Returns the exception raised in the last operation; if the operation was successful and no exception was raised, returns null.
    Returns the currently used whitespace.
    boolean
    Returns the indicator whether this writer will throw exceptions on I/O operation errors or just return default values.
    void
    Prints a whitespace.
    void
    print(boolean value)
    Prints a boolean value as a human readable string.
    void
    print(byte value)
    Prints a byte value as a human readable string.
    void
    print(char value)
    Prints a character value as a human readable string.
    void
    print(double value)
    Prints a double-precision floating-point value as a human readable string.
    void
    print(float value)
    Prints a floating-point value as a human readable string.
    void
    print(int value)
    Prints an integer value as a human readable string.
    void
    print(long value)
    Prints a long integer value as a human readable string.
    void
    print(short value)
    Prints a short integer value as a human readable string.
    void
    print(Object value)
    Prints an object as a human readable string.
    void
    print(String value)
    Prints a string.
    void
    Prints any buffered data to the underlying output stream and then flushes that stream.
    void
    printf(String format, Object... arguments)
    Prints a formatted string using the specified format string and arguments.
    void
    Prints a line separator as defined by the line.separator system property.
    void
    println(boolean value)
    Prints a boolean value and then terminates the line.
    void
    println(boolean... values)
    Prints all given boolean values in sequence separated by whitespace and then terminates the line.
    void
    println(boolean[][] value)
    Prints the given boolean matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(byte value)
    Prints a byte value and then terminates the line.
    void
    println(byte... values)
    Prints all given byte values in sequence separated by whitespace and then terminates the line.
    void
    println(byte[][] value)
    Prints the given byte matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(char value)
    Prints a character value and then terminates the line.
    void
    println(char... values)
    Prints all given character values in sequence separated by whitespace and then terminates the line.
    void
    println(char[][] value)
    Prints the given character matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(double value)
    Prints a double-precision floating-point value and then terminates the line.
    void
    println(double... values)
    Prints all given double-precision floating-point values in sequence separated by whitespace and then terminates the line.
    void
    println(double[][] value)
    Prints the given double-precision floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(float value)
    Prints a floating-point value and then terminates the line.
    void
    println(float... values)
    Prints all given floating-point values in sequence separated by whitespace and then terminates the line.
    void
    println(float[][] value)
    Prints the given floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(int value)
    Prints an integer value and then terminates the line.
    void
    println(int... values)
    Prints all given integer values in sequence separated by whitespace and then terminates the line.
    void
    println(int[][] value)
    Prints the given integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(long value)
    Prints a long integer value and then terminates the line.
    void
    println(long... values)
    Prints all given long integer values in sequence separated by whitespace and then terminates the line.
    void
    println(long[][] value)
    Prints the given long integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(short value)
    Prints a short integer value and then terminates the line.
    void
    println(short... values)
    Prints all given short integer values in sequence separated by whitespace and then terminates the line.
    void
    println(short[][] value)
    Prints the given short integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Boolean... values)
    Prints all given boolean values in sequence separated by whitespace and then terminates the line.
    void
    println(Boolean[][] value)
    Prints the given boolean matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Byte... values)
    Prints all given byte values in sequence separated by whitespace and then terminates the line.
    void
    println(Byte[][] value)
    Prints the given byte matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Character... values)
    Prints all given character values in sequence separated by whitespace and then terminates the line.
    void
    println(Character[][] value)
    Prints the given character matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Double... values)
    Prints all given double-precision floating-point values in sequence separated by whitespace and then terminates the line.
    void
    println(Double[][] value)
    Prints the given double-precision floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Float... values)
    Prints all given floating-point values in sequence separated by whitespace and then terminates the line.
    void
    println(Float[][] value)
    Prints the given floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Integer... values)
    Prints all given integer values in sequence separated by whitespace and then terminates the line.
    void
    println(Integer[][] value)
    Prints the given integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Long... values)
    Prints all given long integer values in sequence separated by whitespace and then terminates the line.
    void
    println(Long[][] value)
    Prints the given long integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Object value)
    Prints an object and then terminates the line.
    void
    println(Object... values)
    Prints all given objects in sequence separated by whitespace and then terminates the line.
    void
    println(Object[][] value)
    Prints the given object matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(Short... values)
    Prints all given short integer values in sequence separated by whitespace and then terminates the line.
    void
    println(Short[][] value)
    Prints the given short integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    println(String value)
    Prints a string and then terminates the line.
    void
    println(String... values)
    Prints all given string values in sequence separated by whitespace and then terminates the line.
    void
    println(String[][] value)
    Prints the given string matrix row by row, each in the separate line, with the individual elements separated by whitespace.
    void
    Prints the given object in JSON (JavaScript Object Notation) format.
    void
    setAutoFlush(boolean autoFlush)
    Configures whether this writer should automatically flush the underlying output stream and force any buffered output bytes to be written out after every operation by calling printbf().
    void
    setThrowingExceptions(boolean shouldThrow)
    Configures whether this writer should throw exceptions on I/O operation errors or just return default values.
    void
    setWhitespace(String whitespace)
    Sets the string used as whitespace.
  • Method Details

    • getWhitespace

      String getWhitespace()
      Returns the currently used whitespace. This whitespace is written by methods like print() and println(Object[]).
      Returns:
      the string currently used as whitespace.
    • setWhitespace

      void setWhitespace(String whitespace)
      Sets the string used as whitespace. This whitespace is written by methods like print() and println(Object[]).
      Parameters:
      whitespace - the string to use as whitespace
    • getAutoFlush

      boolean getAutoFlush()
      Returns whether this writer automatically flushes the underlying output stream and forces any buffered output bytes to be written out after every operation by calling printbf().
      Returns:
      true if this writer automatically flushes the underlying output stream; false otherwise.
    • setAutoFlush

      void setAutoFlush(boolean autoFlush)
      Configures whether this writer should automatically flush the underlying output stream and force any buffered output bytes to be written out after every operation by calling printbf().
      Parameters:
      autoFlush - if true this writer will call printbf() after every operation
    • isThrowingExceptions

      boolean isThrowingExceptions()
      Returns the indicator whether this writer will throw exceptions on I/O operation errors or just return default values.
      Returns:
      true if this writer throws exceptions on failed I/O operations; false otherwise.
    • setThrowingExceptions

      void setThrowingExceptions(boolean shouldThrow)
      Configures whether this writer should throw exceptions on I/O operation errors or just return default values.
      Parameters:
      shouldThrow - true if this writer should throw exceptions on failed I/O operations in the future; false if it should return default values.
    • getLastException

      Throwable getLastException()
      Returns the exception raised in the last operation; if the operation was successful and no exception was raised, returns null.
      Returns:
      the exception raised in the last operation or null it the operation was successful.
    • close

      void close() throws SvetovidIOException
      Closes this writer and releases any resources associated with the underlying stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(boolean value) throws SvetovidIOException
      Prints a boolean value as a human readable string.
      Parameters:
      value - The boolean value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(byte value) throws SvetovidIOException
      Prints a byte value as a human readable string.
      Parameters:
      value - The byte value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(short value) throws SvetovidIOException
      Prints a short integer value as a human readable string.
      Parameters:
      value - The short value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(int value) throws SvetovidIOException
      Prints an integer value as a human readable string.
      Parameters:
      value - The integer value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(long value) throws SvetovidIOException
      Prints a long integer value as a human readable string.
      Parameters:
      value - The long value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(float value) throws SvetovidIOException
      Prints a floating-point value as a human readable string.
      Parameters:
      value - The float value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(double value) throws SvetovidIOException
      Prints a double-precision floating-point value as a human readable string.
      Parameters:
      value - The double value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(char value) throws SvetovidIOException
      Prints a character value as a human readable string.
      Parameters:
      value - The character value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(String value) throws SvetovidIOException
      Prints a string. If the argument is null then the string "null" is printed.
      Parameters:
      value - The String value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print(Object value) throws SvetovidIOException
      Prints an object as a human readable string.
      Parameters:
      value - The Object to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • print

      void print() throws SvetovidIOException
      Prints a whitespace.
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • printbf

      void printbf() throws SvetovidIOException
      Prints any buffered data to the underlying output stream and then flushes that stream.
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(boolean value) throws SvetovidIOException
      Prints a boolean value and then terminates the line. This method behaves as though it invokes print(boolean) and then println().
      Parameters:
      value - The boolean value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(byte value) throws SvetovidIOException
      Prints a byte value and then terminates the line. This method behaves as though it invokes print(byte) and then println().
      Parameters:
      value - The byte value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(short value) throws SvetovidIOException
      Prints a short integer value and then terminates the line. This method behaves as though it invokes print(short) and then println().
      Parameters:
      value - The short value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(int value) throws SvetovidIOException
      Prints an integer value and then terminates the line. This method behaves as though it invokes print(int) and then println().
      Parameters:
      value - The integer value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(long value) throws SvetovidIOException
      Prints a long integer value and then terminates the line. This method behaves as though it invokes print(long) and then println().
      Parameters:
      value - The long value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(float value) throws SvetovidIOException
      Prints a floating-point value and then terminates the line. This method behaves as though it invokes print(float) and then println(). println().
      Parameters:
      value - The float value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(double value) throws SvetovidIOException
      Prints a double-precision floating-point value and then terminates the line. This method behaves as though it invokes print(double) and then println().
      Parameters:
      value - The double value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(char value) throws SvetovidIOException
      Prints a character value and then terminates the line. This method behaves as though it invokes print(char) and then println().
      Parameters:
      value - The character value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(String value) throws SvetovidIOException
      Prints a string and then terminates the line. This method behaves as though it invokes print(String) and then println().
      Parameters:
      value - The String value to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Object value) throws SvetovidIOException
      Prints an object and then terminates the line. This method behaves as though it invokes print(Object) and then println().
      Parameters:
      value - The Object to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println() throws SvetovidIOException
      Prints a line separator as defined by the line.separator system property.
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(boolean... values) throws SvetovidIOException
      Prints all given boolean values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(boolean) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The boolean values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(byte... values) throws SvetovidIOException
      Prints all given byte values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(byte) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The byte values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(short... values) throws SvetovidIOException
      Prints all given short integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(short) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The short values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(int... values) throws SvetovidIOException
      Prints all given integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(int) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The int values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(long... values) throws SvetovidIOException
      Prints all given long integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(long) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The long values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(float... values) throws SvetovidIOException
      Prints all given floating-point values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(float) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The float values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(double... values) throws SvetovidIOException
      Prints all given double-precision floating-point values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(double) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The double values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(char... values) throws SvetovidIOException
      Prints all given character values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(char) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The char values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Boolean... values) throws SvetovidIOException
      Prints all given boolean values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Boolean values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Byte... values) throws SvetovidIOException
      Prints all given byte values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Byte values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Short... values) throws SvetovidIOException
      Prints all given short integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Short values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Integer... values) throws SvetovidIOException
      Prints all given integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Integer values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Long... values) throws SvetovidIOException
      Prints all given long integer values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Long values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Float... values) throws SvetovidIOException
      Prints all given floating-point values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Float values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Double... values) throws SvetovidIOException
      Prints all given double-precision floating-point values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Double values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Character... values) throws SvetovidIOException
      Prints all given character values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes println(Object[]).
      Parameters:
      values - The Character values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(String... values) throws SvetovidIOException
      Prints all given string values in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(String) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The String values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Object... values) throws SvetovidIOException
      Prints all given objects in sequence separated by whitespace and then terminates the line. This method behaves as though it invokes print(Object) for each of the given values invoking print() in-between and println() at the end.
      Parameters:
      values - The Object values to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(boolean[][] value) throws SvetovidIOException
      Prints the given boolean matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The boolean matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(byte[][] value) throws SvetovidIOException
      Prints the given byte matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The byte matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(short[][] value) throws SvetovidIOException
      Prints the given short integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The short matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(int[][] value) throws SvetovidIOException
      Prints the given integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The int matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(long[][] value) throws SvetovidIOException
      Prints the given long integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The long matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(float[][] value) throws SvetovidIOException
      Prints the given floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The float matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(double[][] value) throws SvetovidIOException
      Prints the given double-precision floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The double matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(char[][] value) throws SvetovidIOException
      Prints the given character matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The char matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Boolean[][] value) throws SvetovidIOException
      Prints the given boolean matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Boolean matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Byte[][] value) throws SvetovidIOException
      Prints the given byte matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Byte matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Short[][] value) throws SvetovidIOException
      Prints the given short integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Short matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Integer[][] value) throws SvetovidIOException
      Prints the given integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Integer matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Long[][] value) throws SvetovidIOException
      Prints the given long integer matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Long matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Float[][] value) throws SvetovidIOException
      Prints the given floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Float matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Double[][] value) throws SvetovidIOException
      Prints the given double-precision floating-point matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Double matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Character[][] value) throws SvetovidIOException
      Prints the given character matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Character matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(String[][] value) throws SvetovidIOException
      Prints the given string matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The String matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • println

      void println(Object[][] value) throws SvetovidIOException
      Prints the given object matrix row by row, each in the separate line, with the individual elements separated by whitespace.
      Parameters:
      value - The Object matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.
    • printf

      void printf(String format, Object... arguments) throws SvetovidFormatException, SvetovidIOException
      Prints a formatted string using the specified format string and arguments. For details see Formatter.
      Parameters:
      format - A format string as described in Formatter string syntax.
      arguments - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The behavior on a null argument depends on the conversion.
      Throws:
      SvetovidFormatException - If a format string is null, contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions. For specification of all possible formatting errors, see the Details section of the Formatter class specification.
      SvetovidIOException - if an error occurred during the operation.
    • printObject

      void printObject(Object value) throws SvetovidIOException
      Prints the given object in JSON (JavaScript Object Notation) format.

      The object is printed using the following rules:

      • null is printed as JSON null literal,
      • Boxed true and false values are printed as JSON literals true and false respectively,
      • Number instances are printed as JSON number literals,
      • String values are printed as JSON string literals,
      • arrays and all Iterables are printed as JSON arrays maintaining iteration order,
      • Maps are printed as JSON objects with each entry representing one member; map entries are printed in iteration order with the entry key as the member's name and entry value as the value,
      • All other objects are converted to strings using their {code toString()}.
      Parameters:
      value - The Object matrix to be written
      Throws:
      SvetovidIOException - if an error occurred during the operation.