Package org.bytemechanics.commons.string
Class Figlet
- java.lang.Object
- 
- org.bytemechanics.commons.string.Figlet
 
- 
 public class Figlet extends Object - Since:
- 1.3.0
- Author:
- afarre
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classFiglet.NoFigletFontFormatExceptionException to report that provided font url is not valid
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]fillColumn(String _column)intlength(String _phrase)Calculate the length of the banner without compressionintlength(String _phrase, boolean _compressed)Calculate the length of the bannerStringline(String _phrase, boolean _compressed, char _filler)Returns an string with the same length of the _phrase but filled with _fillerStringline(String _phrase, char _filler)Returns an string with the same length of the _phrase but filled with _filler without compressionStringprint(String _phrase)Returns an string that represents the _phrase using the loaded fontStringprint(String _phrase, boolean _compressed)Returns an string that represents the _phrase using the loaded fontprotected String[]render(char _character, boolean _compressed)Renderizes any character if compressed is true removes first and last columnprotected String[]render(String _phrase, boolean _compressed)Renderizes the given phrase if compressed is true then each character is renderized without the first and the last columnprotected String[]renderCharacter(char _character, boolean _compressed)Renderizes a printable character if compressed is true removes first and last columnprotected String[]renderTab()Renderizes a tab character
 
- 
- 
- 
Constructor Detail- 
Figletpublic Figlet(Path _figletFontFile, Charset _charset) throws IOException - Throws:
- IOException
 
 - 
Figletpublic Figlet(InputStream _inputStream, Charset _charset) throws IOException - Throws:
- IOException
 
 
- 
 - 
Method Detail- 
renderTabprotected String[] renderTab() Renderizes a tab character- Returns:
- list of string lines with the tab escape character
 
 - 
renderCharacterprotected String[] renderCharacter(char _character, boolean _compressed) Renderizes a printable character if compressed is true removes first and last column- Parameters:
- _character- character to render
- _compressed- compressing flag (remove first and last columns)
- Returns:
- list of string that represents the scanlines of the given character
 
 - 
renderprotected String[] render(char _character, boolean _compressed) Renderizes any character if compressed is true removes first and last column- Parameters:
- _character- character to render
- _compressed- compressing flag (remove first and last columns)
- Returns:
- list of string that represents the scanlines of the given character
 
 - 
renderprotected String[] render(String _phrase, boolean _compressed) Renderizes the given phrase if compressed is true then each character is renderized without the first and the last column- Parameters:
- _phrase- phrase to render
- _compressed- compressing flag (remove first and last columns)
- Returns:
- list of string that represents the scanlines of the given phrase
 
 - 
printpublic String print(String _phrase, boolean _compressed) Returns an string that represents the _phrase using the loaded font- Parameters:
- _phrase- phrase to represent
- _compressed- compressing flag (remove first and last columns)
- Returns:
- string that represents the phrase with the provided font
 
 - 
printpublic String print(String _phrase) Returns an string that represents the _phrase using the loaded font- Parameters:
- _phrase- phrase to represent
- Returns:
- string that represents the phrase with the provided font
 
 - 
lengthpublic int length(String _phrase, boolean _compressed) Calculate the length of the banner- Parameters:
- _phrase- phrase to calculate length
- _compressed- if phrase must be considered compressed
- Returns:
- the length of the banner
 
 - 
lengthpublic int length(String _phrase) Calculate the length of the banner without compression- Parameters:
- _phrase- phrase to calculate length
- Returns:
- the length of the banner
 
 - 
linepublic String line(String _phrase, boolean _compressed, char _filler) Returns an string with the same length of the _phrase but filled with _filler- Parameters:
- _phrase- phrase to represent
- _compressed- if phrase must be considered compressed
- _filler- character to fill the same phrase length in the returned string
- Returns:
- string with the same length of the phrase corresponding banner but with only onle line filled with _filler
 
 - 
linepublic String line(String _phrase, char _filler) Returns an string with the same length of the _phrase but filled with _filler without compression- Parameters:
- _phrase- phrase to represent
- _filler- character to fill the same phrase length in the returned string
- Returns:
- string with the same length of the phrase corresponding banner but with only onle line filled with _filler
 
 
- 
 
-