Package org.basex.io.out
Class NewlineOutput
- java.lang.Object
-
- java.io.OutputStream
-
- org.basex.io.out.PrintOutput
-
- org.basex.io.out.NewlineOutput
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public final class NewlineOutput extends PrintOutput
This class is a wrapper for outputting text with specific newline characters.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Field Summary
-
Fields inherited from class org.basex.io.out.PrintOutput
lineLength, max, os, size
-
-
Constructor Summary
Constructors Constructor Description NewlineOutput(PrintOutput po, byte[] newline)
Constructor, given an output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
finished()
Checks if the output stream is exhausted.void
print(int cp)
Prints a single codepoint, and keeps track of the current line length.-
Methods inherited from class org.basex.io.out.PrintOutput
close, flush, get, lineLength, print, print, println, println, setLimit, size, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
-
-
-
Constructor Detail
-
NewlineOutput
public NewlineOutput(PrintOutput po, byte[] newline)
Constructor, given an output stream.- Parameters:
po
- output stream referencenewline
- newline string
-
-
Method Detail
-
print
public void print(int cp) throws IOException
Description copied from class:PrintOutput
Prints a single codepoint, and keeps track of the current line length.- Overrides:
print
in classPrintOutput
- Parameters:
cp
- codepoint to be printed- Throws:
IOException
- I/O exception
-
finished
public boolean finished()
Description copied from class:PrintOutput
Checks if the output stream is exhausted.- Overrides:
finished
in classPrintOutput
- Returns:
true
if stream is exhausted
-
-