Package com.igormaznitsa.jcp.containers
Class TextFileDataContainer
- java.lang.Object
-
- com.igormaznitsa.jcp.containers.TextFileDataContainer
-
public final class TextFileDataContainer extends java.lang.ObjectThe class contains text data of a file and the string position index for the file
-
-
Field Summary
Fields Modifier and Type Field Description private booleanautoFlushFlag shows to save automatically buffers after file preprocessing end.private java.io.Filefileprivate booleanfileEndedByNextLineprivate intnextStringIndexprivate 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 voiddisableAutoFlush()booleanequals(java.lang.Object that)java.io.FilegetFile()intgetLastReadStringIndex()intgetNextStringIndex()java.lang.String[]getText()inthashCode()booleanisAutoFlush()booleanisPresentedNextLineOnReadString()java.lang.StringnextLine()voidreset()voidsetNextStringIndex(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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equalsin classjava.lang.Object
-
-