本文整理匯總了Golang中github.com/balzaczyy/golucene/store.IndexInput.ReadByte方法的典型用法代碼示例。如果您正苦於以下問題:Golang IndexInput.ReadByte方法的具體用法?Golang IndexInput.ReadByte怎麽用?Golang IndexInput.ReadByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/balzaczyy/golucene/store.IndexInput
的用法示例。
在下文中一共展示了IndexInput.ReadByte方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: readFields
/*
Lucene42DocValuesProducer.java
Line 126
*/
func (dvp *Lucene42DocValuesProducer) readFields(meta store.IndexInput, infos FieldInfos) (err error) {
fieldNumber, err := meta.ReadVInt()
for fieldNumber != -1 && err == nil {
fieldType, err := meta.ReadByte()
if err != nil {
break
}
switch fieldType {
case LUCENE42_DV_NUMBER:
entry := NumericEntry{}
entry.offset, err = meta.ReadLong()
if err != nil {
return err
}
entry.format, err = meta.ReadByte()
if err != nil {
return err
}
switch entry.format {
case LUCENE42_DV_DELTA_COMPRESSED:
case LUCENE42_DV_TABLE_COMPRESSED:
case LUCENE42_DV_GCD_COMPRESSED:
case LUCENE42_DV_UNCOMPRESSED:
default:
return errors.New(fmt.Sprintf("Unknown format: %v, input=%v", entry.format, meta))
}
if entry.format != LUCENE42_DV_UNCOMPRESSED {
n, err := meta.ReadVInt()
if err != nil {
return err
}
entry.packedIntsVersion = int(n)
}
case LUCENE42_DV_BYTES:
panic("not implemented yet")
case LUCENE42_DV_FST:
panic("not implemented yet")
default:
return errors.New(fmt.Sprintf("invalid entry type: %v, input=%v", fieldType, meta))
}
fieldNumber, err = meta.ReadVInt()
}
return err
}