Class AIInOut.AIFileSegmentInOut
- java.lang.Object
-
- net.stoerr.ai.aigenpipeline.framework.task.AIInOut.AIFileSegmentInOut
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.stoerr.ai.aigenpipeline.framework.task.AIInOut
AIInOut.AIFileInOut, AIInOut.AIFileSegmentInOut, AIInOut.AIStreamInOut
-
-
Field Summary
Fields Modifier and Type Field Description protected SegmentedFile
segmentedFile
protected int
segmentIndex
-
Constructor Summary
Constructors Constructor Description AIFileSegmentInOut(SegmentedFile segmentedFile, int segmentIndex)
Constructs an AIFileSegmentInOut instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
The underlying file.String
read()
Reads the segment from the segmented file and returns its content as a string.String
toString()
void
write(String content)
Writes a string to the segment of the segmented file.
-
-
-
Field Detail
-
segmentedFile
protected final SegmentedFile segmentedFile
-
segmentIndex
protected final int segmentIndex
-
-
Constructor Detail
-
AIFileSegmentInOut
public AIFileSegmentInOut(SegmentedFile segmentedFile, int segmentIndex)
Constructs an AIFileSegmentInOut instance.- Parameters:
segmentedFile
- the segmented file to read fromsegmentIndex
- the index of the segment to read
-
-
Method Detail
-
read
public String read()
Reads the segment from the segmented file and returns its content as a string.
-
write
public void write(String content)
Writes a string to the segment of the segmented file.
-
-