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 whenarmoredis set to true).intReturns the total number of letters in a word (used whenarmoredis set to true).Returns the instance ofOutputStream.intReturns the total number of words in a phrase (used whenarmoredis set to true).booleanInternal method used by the JNI interface.booleanArmored content flag.voidSets the name of the application (used whenarmoredis set to true).voidsetArmored(boolean armored) Armored content flag.voidsetLettersInWords(int lettersInWords) Sets the total number of letters in a word (used whenarmoredis set to true).voidsetWordsInPhrase(int wordsInPhrase) Sets the total number of words in a phrase (used whenarmoredis 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 theOutputStreamwill contain armored code, false otherwise.
-
getApp
Returns the name of the application (used whenarmoredis 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 whenarmoredis 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 whenarmoredis 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 whenarmoredis 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 whenarmoredis 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 whenarmoredis 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.
-