Class BinSearchUtils
java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.BinSearchUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareToPrefix(InputStream in, byte[] prefix) static InputStreamconfigureStream(SeekableReadableChannel<byte[]> channel, long end, byte[] prefix, BinSearchLevelCache levelCache) static longreadUntilDelimiter(InputStream in, byte delimiter, long allowedSearchBytes) Find the delimiter byte within the next 'allowedSearchBytes' bytes.
-
Constructor Details
-
BinSearchUtils
public BinSearchUtils()
-
-
Method Details
-
readUntilDelimiter
public static long readUntilDelimiter(InputStream in, byte delimiter, long allowedSearchBytes) throws IOException Find the delimiter byte within the next 'allowedSearchBytes' bytes. Returns -1 if none encountered. Returns number of bytes read.- Throws:
IOException
-
compareToPrefix
- Throws:
IOException
-
configureStream
public static InputStream configureStream(SeekableReadableChannel<byte[]> channel, long end, byte[] prefix, BinSearchLevelCache levelCache) throws IOException - Throws:
IOException
-