Package com.igormaznitsa.jcp.containers
Class TextFileDataContainer
- java.lang.Object
-
- com.igormaznitsa.jcp.containers.TextFileDataContainer
-
public final class TextFileDataContainer extends java.lang.Object
The class contains text data of a file and the string position index for the file
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
autoFlush
Flag shows to save automatically buffers after file preprocessing end.private java.io.File
file
private boolean
fileEndedByNextLine
private int
nextStringIndex
private java.lang.String[]
text
-
Constructor Summary
Constructors Constructor Description TextFileDataContainer(TextFileDataContainer item, int stringIndex)
TextFileDataContainer(java.io.File currentFile, java.lang.String[] text, boolean fileEndedByNextLine, int stringIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableAutoFlush()
boolean
equals(java.lang.Object that)
java.io.File
getFile()
int
getLastReadStringIndex()
int
getNextStringIndex()
java.lang.String[]
getText()
int
hashCode()
boolean
isAutoFlush()
boolean
isPresentedNextLineOnReadString()
java.lang.String
nextLine()
void
reset()
void
setNextStringIndex(int index)
-
-
-
Field Detail
-
text
private final java.lang.String[] text
-
fileEndedByNextLine
private final boolean fileEndedByNextLine
-
file
private final java.io.File file
-
autoFlush
private boolean autoFlush
Flag shows to save automatically buffers after file preprocessing end.
-
nextStringIndex
private int nextStringIndex
-
-
Constructor Detail
-
TextFileDataContainer
public TextFileDataContainer(TextFileDataContainer item, int stringIndex)
-
TextFileDataContainer
public TextFileDataContainer(java.io.File currentFile, @MustNotContainNull java.lang.String[] text, boolean fileEndedByNextLine, int stringIndex)
-
-
Method Detail
-
disableAutoFlush
public void disableAutoFlush()
-
isAutoFlush
public boolean isAutoFlush()
-
getText
@MustNotContainNull public java.lang.String[] getText()
-
getFile
public java.io.File getFile()
-
reset
public void reset()
-
isPresentedNextLineOnReadString
public boolean isPresentedNextLineOnReadString()
-
nextLine
public java.lang.String nextLine()
-
setNextStringIndex
public void setNextStringIndex(int index)
-
getLastReadStringIndex
public int getLastReadStringIndex()
-
getNextStringIndex
public int getNextStringIndex()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals
in classjava.lang.Object
-
-