Class AIInOut.AIFileInOut
- java.lang.Object
-
- net.stoerr.ai.aigenpipeline.framework.task.AIInOut.AIFileInOut
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.stoerr.ai.aigenpipeline.framework.task.AIInOut
AIInOut.AIFileInOut, AIInOut.AIFileSegmentInOut, AIInOut.AIStreamInOut
-
-
Constructor Summary
Constructors Constructor Description AIFileInOut(File file)
Constructs an AIFileInOut instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
The underlying file.String
read()
Reads the file and returns its content as a string.String
toString()
void
write(String content)
Writes a string to the file.
-
-
-
Constructor Detail
-
AIFileInOut
public AIFileInOut(File file)
Constructs an AIFileInOut instance.- Parameters:
file
- the file to read from
-
-
Method Detail
-
read
public String read() throws IllegalStateException
Reads the file and returns its content as a string.- Specified by:
read
in interfaceAIInOut
- Returns:
- the file content as a string
- Throws:
IllegalStateException
- if the input cannot be read
-
write
public void write(String content)
Writes a string to the file.
-
-