Package com.sshtools.synergy.ssh
Class TerminalModes.TerminalModesBuilder
java.lang.Object
com.sshtools.synergy.ssh.TerminalModes.TerminalModesBuilder
- Enclosing class:
- TerminalModes
Builds
TerminalModes.
You can reuse an instance of this class providing that you do not want to change any of the modes. If you do want to change modes you can call the reset method to clear out old modes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newTerminalModes.create()Create a newTerminalModes.TerminalModesBuilderfromBytes(byte[] modes) read(com.sshtools.common.util.ByteArrayReader reader) reset()Clear all modes set in this builder.withMode(int mode) Set aboolean>code> mode totrue.withMode(int mode, boolean value) Set abooleanmode.withMode(int mode, int value) Set anintegermode.withMode(TerminalModes.Mode mode, boolean value) Set abooleanmode.withMode(TerminalModes.Mode mode, int value) Set anintegermode.withModes(TerminalModes.Mode... modes) Set one or more modes totrue, i.e.withoutMode(int mode) Set aboolean>code> mode tofalse.withoutModes(TerminalModes.Mode... modes) Set one or more modes tofalse, i.e.
-
Constructor Details
-
TerminalModesBuilder
public TerminalModesBuilder()
-
-
Method Details
-
reset
Clear all modes set in this builder.- Returns:
- this for chaining
-
withModes
Set one or more modes totrue, i.e. a value of 1.- Parameters:
modes- modes- Returns:
- this for chaining
-
withoutModes
Set one or more modes tofalse, i.e. a value of 0.- Parameters:
modes- modes- Returns:
- this for chaining
-
withMode
Set abooleanmode.- Parameters:
mode- modevalue- value to set- Returns:
- this for chaining
-
withMode
Set abooleanmode.- Parameters:
mode- modevalue- value to set- Returns:
- this for chaining
-
withMode
Set anintegermode.- Parameters:
mode- modevalue- value to set- Returns:
- this for chaining
-
withMode
Set anintegermode.- Parameters:
mode- modevalue- value to set- Returns:
- this for chaining
-
withMode
Set aboolean>code> mode totrue.- Parameters:
mode- mode- Returns:
- this for chaining
-
withoutMode
Set aboolean>code> mode tofalse.- Parameters:
mode- mode- Returns:
- this for chaining
-
create
Create a newTerminalModes.TerminalModesBuilder- Returns:
- builder
-
build
Build a newTerminalModes.- Returns:
- modes
- Throws:
IOException
-
fromBytes
-
read
-