Package com.gherynos.libsaltpack
Class OutputParameters
java.lang.Object
com.gherynos.libsaltpack.OutputParameters
POJO class containing the OutputStream and the parameters to generate BaseX armored content.
The alphabet used is BASE62.
-
Constructor Summary
ConstructorsConstructorDescriptionOutputParameters
(OutputStream outputStream) Creates a new OutputParameters instance for a specific OutputStream. -
Method Summary
Modifier and TypeMethodDescriptiongetApp()
Returns the name of the application (used whenarmored
is set to true).int
Returns the total number of letters in a word (used whenarmored
is set to true).Returns the instance ofOutputStream
.int
Returns the total number of words in a phrase (used whenarmored
is set to true).boolean
Internal method used by the JNI interface.boolean
Armored content flag.void
Sets the name of the application (used whenarmored
is set to true).void
setArmored
(boolean armored) Armored content flag.void
setLettersInWords
(int lettersInWords) Sets the total number of letters in a word (used whenarmored
is set to true).void
setWordsInPhrase
(int wordsInPhrase) Sets the total number of words in a phrase (used whenarmored
is set to true).
-
Constructor Details
-
OutputParameters
Creates a new OutputParameters instance for a specific OutputStream.- Parameters:
outputStream
- the destination output stream that will contain binary or armored data.
-
-
Method Details
-
getOutputStream
Returns the instance ofOutputStream
.- Returns:
- the output stream.
-
isArmored
public boolean isArmored()Armored content flag.- Returns:
- true if the output stream will contain armored content, false otherwise.
-
setArmored
public void setArmored(boolean armored) Armored content flag.- Parameters:
armored
- set true if theOutputStream
will contain armored code, false otherwise.
-
getApp
Returns the name of the application (used whenarmored
is set to true).- Returns:
- the application name that will be added in the header and footer of the message.
-
setApp
Sets the name of the application (used whenarmored
is set to true).- Parameters:
app
- the application name that will be added to the header and footer of the message.
-
getLettersInWords
public int getLettersInWords()Returns the total number of letters in a word (used whenarmored
is set to true).- Returns:
- the number of letters before producing a space during the armoring.
-
setLettersInWords
public void setLettersInWords(int lettersInWords) Sets the total number of letters in a word (used whenarmored
is set to true).- Parameters:
lettersInWords
- the number of letters before producing a space during the armoring.
-
getWordsInPhrase
public int getWordsInPhrase()Returns the total number of words in a phrase (used whenarmored
is set to true).- Returns:
- the number of words before producing a new line during the armoring.
-
setWordsInPhrase
public void setWordsInPhrase(int wordsInPhrase) Sets the total number of words in a phrase (used whenarmored
is set to true).- Parameters:
wordsInPhrase
- the number of words before producing a new line during the armoring.
-
intParamsPopulated
public boolean intParamsPopulated()Internal method used by the JNI interface.- Returns:
- parameters populated.
-