クラス ConsumerCommand
java.lang.Object
com.streamConverter.command.AbstractStreamCommand
com.streamConverter.command.ConsumerCommand
- すべての実装されたインタフェース:
IStreamCommand
- 直系の既知のサブクラス:
ValidateCommand
Abstract class for commands that consume an input stream and produce an output stream.
This class provides a template method pattern for executing the command, ensuring that the input and output streams are not null. It also provides a method to consume the input stream, which must be implemented by subclasses.
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明void
_execute
(InputStream inputStream, OutputStream outputStream) Executes the command on the provided input stream and writes the result to the output stream.abstract void
consume
(InputStream inputStream) Abstract method to be implemented by subclasses for consuming the input stream.クラスから継承されたメソッド com.streamConverter.command.AbstractStreamCommand
execute
-
コンストラクタの詳細
-
ConsumerCommand
public ConsumerCommand()Default constructor.Initializes the command with default settings.
-
-
メソッドの詳細
-
_execute
Executes the command on the provided input stream and writes the result to the output stream.- 定義:
_execute
クラス内AbstractStreamCommand
- パラメータ:
inputStream
- The input stream to read data from.outputStream
- The output stream to write data to.- 例外:
IOException
- If an I/O error occurs during the execution of the command.
-
consume
Abstract method to be implemented by subclasses for consuming the input stream.- パラメータ:
inputStream
- The input stream to read data from.- 例外:
IOException
- If an I/O error occurs during the execution of the command.
-