Class AbstractSvetovidWriter

java.lang.Object
org.svetovid.io.AbstractSvetovidWriter
All Implemented Interfaces:
Closeable, AutoCloseable, SvetovidWriter
Direct Known Subclasses:
DefaultSvetovidWriter

public abstract class AbstractSvetovidWriter extends Object implements SvetovidWriter
This class provides default implementations for the SvetovidWriter interface. Standard behaviors of all methods are defined here. The developer need only subclass this abstract class and define the doPrint(String), doPrintln(String) and doFlush() methods.
Author:
Ivan Pribela
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected boolean
     
    protected final String
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    appendObject(StringBuilder builder, String prefix, boolean printPrefix, Object value)
     
    void
    Closes this writer and releases any resources associated with the underlying stream.
    protected abstract void
     
    protected abstract void
    doPrint(String value)
     
    protected abstract void
     
    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 SvetovidWriter.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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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 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... value)
    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... value)
    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 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... value)
    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... value)
    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... value)
    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... value)
    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... value)
    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 SvetovidWriter.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.
    protected void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait