public class IndentedPrintStream extends PrintStream
out| Constructor and Description |
|---|
IndentedPrintStream(OutputStream outputStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
align(Object... s)
Takes an array of strings to be aligned in separate columns, and adds them to the alignedblock
|
void |
closeBlock()
Outdents the line and prints a close curly bracket on the following line
|
void |
closeBlock(String s)
Outdents the current line and prints a close curly bracket on the next line, followed by a string
|
void |
continueBlock(String s)
Ends one block (outdent followed by a close curly bracket on the following line) prints a string
on its own line and begins a new block (open curly bracket followed by an indent on the following
line
|
void |
forceNewLine()
Print a linebreak unless we are at the start of a line.
|
String |
getLinePrefix() |
long |
getOffset() |
boolean |
getPrintOffsets() |
void |
indent()
Increases the indent on the current line
|
boolean |
isNoIndent() |
boolean |
isNoNl() |
boolean |
isoNlCr() |
boolean |
isRemoveNl() |
void |
openBlock()
prints an open curly bracket and indents the following line
|
void |
openBlock(String s)
Prints a string, an open curly bracket on its own line and indents the following line
|
void |
outdent()
Decreases the indent on the current line
|
void |
print(boolean b)
print a boolean with no indent
|
void |
print(char c)
print a character with no indent
|
void |
print(char[] s)
print a character array with no indent
|
void |
print(double d)
print a double with no indent
|
void |
print(float f)
print a floating point number with no indent
|
void |
print(int i)
print an integer with no indent
|
void |
print(int tempIndent,
boolean b)
Indent the current line and print a boolean on the same line
|
void |
print(int tempIndent,
char c)
Indent the current line and print a character on the same line
|
void |
print(int tempIndent,
char[] s)
Indent the current line and print a character array on the same line
|
void |
print(int tempIndent,
double d)
Indent the current line and print a double on the same line
|
void |
print(int tempIndent,
float f)
Indent the current line and print a floating point number on the same line
|
void |
print(int tempIndent,
int i)
Indent the current line and print an integer on the same line
|
void |
print(int tempIndent,
long l)
Indent the current line and print a long integer on the same line
|
void |
print(int tempIndent,
Object obj)
Indent the current line and print an object on the same line
|
void |
print(int tempIndent,
String s)
Indent the current line and print a string on the same line
|
void |
print(int indent,
String pattern,
Object... arguments)
Calls string.format, indents and prints
|
void |
print(long l)
print a long integer with no indent
|
void |
print(Object obj)
print an object with no indent
|
void |
print(String s)
print a string with no indent
|
void |
print(String pattern,
Object... arguments)
Convenience method for calling string.format and printing
|
void |
printAlignedBlock()
Prints the alignedblock without any separators or terminators
|
void |
printlines(String... strings)
Print multiple strings, each with a line break.
|
void |
println()
Prints a linebreak
|
void |
println(boolean x)
print a boolean with no indent with a line break
|
void |
println(char x)
print a character with no indent with a line break
|
void |
println(char[] x)
print a character array with no indent with a line break
|
void |
println(Collection<String> str)
Prints all strings in a collection on individual lines
|
void |
println(double x)
print a double with no indent with a line break
|
void |
println(float x)
print a floating point number with no indent with a line break
|
void |
println(int x)
print an integer with no indent with a line break
|
void |
println(int tempIndent,
boolean x)
Indent the current line and print a boolean on the same line,
then print a line break
|
void |
println(int tempIndent,
char x)
Indent the current line and print a character on the same line,
then print a line break
|
void |
println(int tempIndent,
char[] x)
Indent the current line and print a character array on the same line,
then print a line break
|
void |
println(int tempIndent,
double x)
Indent the current line and print a double on the same line,
then print a line break
|
void |
println(int tempIndent,
float x)
Indent the current line and print a floating point number
on the same line, then print a line break
|
void |
println(int tempIndent,
int x)
Indent the current line and print an integer on the same line,
then print a line break
|
void |
println(int tempIndent,
long x)
Indent the current line and print a long integer on the same line,
then print a line break
|
void |
println(int tempIndent,
Object x)
Indent the current line and print an object on the same line,
then print a line break
|
void |
println(int tempIndent,
String x)
Indent the current line and print a string on the same line,
then print a line break
|
void |
println(int indent,
String pattern,
Object... arguments)
Calls string.format, indents and prints with line break
|
void |
println(long x)
print a long integer with no indent with a line break
|
void |
println(Object x)
print an object with no indent with a line break
|
void |
println(String x)
print a string with no indent with a line break
|
void |
println(String pattern,
Object... arguments)
Convenience method for calling string.format and printing
with line breaks
|
void |
setLinePrefix(String linePrefix) |
void |
setNoIndent(boolean noIndent) |
void |
setNoNl(boolean noNl) |
void |
setoNlCr(boolean oNlCr) |
void |
setPrintOffsets(boolean printOffsets) |
void |
setRemoveNl(boolean removeNl) |
append, append, append, checkError, clearError, close, flush, format, format, printf, printf, setError, write, writewritepublic IndentedPrintStream(OutputStream outputStream)
public void setPrintOffsets(boolean printOffsets)
public boolean getPrintOffsets()
public void setLinePrefix(String linePrefix)
public String getLinePrefix()
public void align(Object... s)
public void printAlignedBlock()
public void openBlock()
public void closeBlock()
public void openBlock(String s)
s - preceding stringpublic void closeBlock(String s)
s - succeeding stringpublic void continueBlock(String s)
s - intermediate stringpublic void indent()
public void outdent()
public void print(int tempIndent,
boolean b)
tempIndent - magnitude of the indent (number of tab spaces)b - boolean to be printedpublic void print(int tempIndent,
char c)
tempIndent - magnitude of the indent (number of tab spaces)c - character to be printedpublic void print(int tempIndent,
char[] s)
tempIndent - magnitude of the indent (number of tab spaces)s - character array to be printedpublic void print(int tempIndent,
double d)
tempIndent - magnitude of the indent (number of tab spaces)d - double to be printedpublic void print(int tempIndent,
float f)
tempIndent - magnitude of the indent (number of tab spaces)f - floating point number to be printedpublic void print(int tempIndent,
int i)
tempIndent - magnitude of the indent (number of tab spaces)i - integer to be printedpublic void print(int tempIndent,
Object obj)
tempIndent - magnitude of the indent (number of tab spaces)obj - object to be printedpublic void print(int tempIndent,
String s)
tempIndent - magnitude of the indent (number of tab spaces)s - string to be printedpublic void print(int tempIndent,
long l)
tempIndent - magnitude of the indent (number of tab spaces)l - long integer to be printedpublic void println()
println in class PrintStreampublic void forceNewLine()
public void println(int tempIndent,
boolean x)
tempIndent - magnitude of the indent (number of tab spaces)x - boolean to be printedpublic void println(int tempIndent,
char x)
tempIndent - magnitude of the indent (number of tab spaces)x - character to be printedpublic void println(int tempIndent,
char[] x)
tempIndent - magnitude of the indent (number of tab spaces)x - character array to be printedpublic void println(int tempIndent,
double x)
tempIndent - magnitude of the indent (number of tab spaces)x - double to be printedpublic void println(int tempIndent,
float x)
tempIndent - magnitude of the indent (number of tab spaces)x - floating point number to be printedpublic void println(int tempIndent,
int x)
tempIndent - magnitude of the indent (number of tab spaces)x - integer to be printedpublic void println(int tempIndent,
Object x)
tempIndent - magnitude of the indent (number of tab spaces)x - object to be printedpublic void println(int tempIndent,
String x)
tempIndent - magnitude of the indent (number of tab spaces)x - string to be printedpublic void println(int tempIndent,
long x)
tempIndent - magnitude of the indent (number of tab spaces)x - long integer to be printedpublic void print(boolean b)
print in class PrintStreamb - boolean to printpublic void print(char c)
print in class PrintStreamc - character to printpublic void print(char[] s)
print in class PrintStreams - character array to printpublic void print(double d)
print in class PrintStreamd - double to printpublic void print(float f)
print in class PrintStreamf - floating point number to printpublic void print(int i)
print in class PrintStreami - integer to printpublic void print(Object obj)
print in class PrintStreamobj - object to printpublic void print(String s)
print in class PrintStreams - string to printpublic void print(long l)
print in class PrintStreaml - long integer to printpublic void println(boolean x)
println in class PrintStreamx - boolean to printpublic void println(char x)
println in class PrintStreamx - character to printpublic void println(char[] x)
println in class PrintStreamx - character array to printpublic void println(double x)
println in class PrintStreamx - double to printpublic void println(float x)
println in class PrintStreamx - floating point number to printpublic void println(int x)
println in class PrintStreamx - integer to printpublic void println(Object x)
println in class PrintStreamx - object to printpublic void println(String x)
println in class PrintStreamx - string to printpublic void printlines(String... strings)
strings - multiple strings to print.public void println(long x)
println in class PrintStreamx - long integer to printpublic void println(Collection<String> str)
str - collection of stringspublic void print(String pattern, Object... arguments)
public void println(String pattern, Object... arguments)
public void print(int indent,
String pattern,
Object... arguments)
public void println(int indent,
String pattern,
Object... arguments)
public long getOffset()
public boolean isoNlCr()
public void setoNlCr(boolean oNlCr)
public boolean isNoIndent()
public void setNoIndent(boolean noIndent)
public boolean isNoNl()
public void setNoNl(boolean noNl)
public boolean isRemoveNl()
public void setRemoveNl(boolean removeNl)
Copyright © 2018 The Symphony Software Foundation. All rights reserved.