Class NodeStreamReader
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.flatfile.analysis.stream.NodeStreamReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,NodeDataReader
public class NodeStreamReader extends java.lang.Object implements NodeDataReader
A node stream reader.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getFileSize()
Get the file size.int
getProgressPercent()
Get the progress in percent (0..100).static NodeStreamReader
open(java.lang.String fileName)
NodeData
readNode()
Read the next node.static int
readVarInt(java.io.InputStream in)
Read a variable size int.
-
-
-
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 NodeStreamReader open(java.lang.String fileName) throws java.io.IOException
- Throws:
java.io.IOException
-
readVarInt
public static int readVarInt(java.io.InputStream in) throws java.io.IOException
Read a variable size int.- Returns:
- the value
- 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
-
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
-
-