Class NodeLineReader
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.flatfile.analysis.stream.NodeLineReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,NodeDataReader
public class NodeLineReader extends java.lang.Object implements NodeDataReader, java.io.Closeable
A reader for flat file stores.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static NodeProperty
fromJsonArray(java.lang.String key, java.lang.String json)
long
getFileSize()
Get the file size.int
getProgressPercent()
Get the progress in percent (0..100).static NodeLineReader
open(java.lang.String fileName)
NodeData
readNode()
Read the next node.
-
-
-
Method Detail
-
getProgressPercent
public int getProgressPercent()
Description copied from interface:NodeDataReader
Get the progress in percent (0..100).- Specified by:
getProgressPercent
in interfaceNodeDataReader
- Returns:
- the progress
-
open
public static NodeLineReader open(java.lang.String fileName) throws java.io.IOException
- Throws:
java.io.IOException
-
readNode
public NodeData readNode() throws java.io.IOException
Description copied from interface:NodeDataReader
Read the next node.- Specified by:
readNode
in interfaceNodeDataReader
- Returns:
- the node, or null for EOF
- Throws:
java.io.IOException
-
fromJsonArray
public static NodeProperty fromJsonArray(java.lang.String key, java.lang.String json)
-
getFileSize
public long getFileSize()
Description copied from interface:NodeDataReader
Get the file size.- Specified by:
getFileSize
in interfaceNodeDataReader
- Returns:
- the file size
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-