Enum SystemStream
- java.lang.Object
-
- java.lang.Enum<SystemStream>
-
- org.jline.terminal.spi.SystemStream
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SystemStream>
public enum SystemStream extends java.lang.Enum<SystemStream>
Represents the standard system streams available in a terminal environment.This enum defines the three standard streams that are typically available in a terminal environment: standard input, standard output, and standard error. These streams are used for communication between the terminal and the processes running within it.
Terminal implementations and PTY objects may be associated with one of these system streams to indicate their role in the terminal environment.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SystemStream
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SystemStream[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Input
public static final SystemStream Input
Standard input stream (stdin).This stream is used to provide input to processes running in the terminal. It typically represents keyboard input from the user.
-
Output
public static final SystemStream Output
Standard output stream (stdout).This stream is used by processes to output normal data. It typically represents the main display output of the terminal.
-
Error
public static final SystemStream Error
Standard error stream (stderr).This stream is used by processes to output error messages and diagnostic information. It may be displayed differently from standard output or redirected to a separate destination.
-
-
Method Detail
-
values
public static SystemStream[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SystemStream c : SystemStream.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SystemStream valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-