Package io.sf.carte.util
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 TypeMethodDescriptionvoid
newLine()
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
(CharSequence seq) Write a character sequence.
-
Method Details
-
newLine
Write a newline according to the characteristics of the target platform.- Throws:
IOException
- if an error happens when writing.
-
write
Write a character sequence.- Parameters:
seq
- the CharSequence.- Throws:
IOException
- if an error happens when writing.
-
write
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
Write a character.- Parameters:
c
- the character.- Throws:
IOException
- if an error happens when writing.
-
write
Write an integer.- Parameters:
num
- the integer number.- Throws:
IOException
- if an error happens when writing.
-