public class BinaryStreamLoader extends BinaryLoader
Constructor and Description |
---|
BinaryStreamLoader(java.net.URL location,
java.lang.String format,
boolean applyLanguageWeightAndWip,
float languageWeight,
double wip,
float unigramWeight) |
Modifier and Type | Method and Description |
---|---|
byte[] |
loadBuffer(long position,
int size)
Loads the contents of the memory-mapped file starting at the given position and for the given size, into a byte
buffer.
|
deallocate, getBigEndian, getBigramOffset, getBigramProbabilities, getBytesPerField, getLogBigramSegmentSize, getLogNGramSegmentSize, getMaxDepth, getNGramBackoffWeights, getNGramOffset, getNGramProbabilities, getNGramSegments, getNumberBigrams, getNumberNGrams, getNumberTrigrams, getNumberUnigrams, getTrigramBackoffWeights, getTrigramOffset, getTrigramProbabilities, getTrigramSegments, getUnigrams, getWords, loadModelLayout
public BinaryStreamLoader(java.net.URL location, java.lang.String format, boolean applyLanguageWeightAndWip, float languageWeight, double wip, float unigramWeight) throws java.io.IOException
java.io.IOException
public byte[] loadBuffer(long position, int size) throws java.io.IOException
BinaryLoader
loadBuffer
in class BinaryLoader
position
- the starting position in the filesize
- the number of bytes to loadjava.io.IOException
- if IO went wrong