예제 #1
0
파일: bytes.go 프로젝트: kiskovacs/golucene
func (bs *BytesStore) forwardReader() BytesReader {
	if len(bs.blocks) == 1 {
		return newForwardBytesReader(bs.blocks[0])
	}
	ans := &BytesStoreForwardReader{owner: bs, nextRead: bs.blockSize}
	ans.DataInputImpl = util.NewDataInput(ans)
	return ans
}
예제 #2
0
func newByteSliceReader() *ByteSliceReader {
	ans := new(ByteSliceReader)
	ans.DataInputImpl = util.NewDataInput(ans)
	return ans
}
예제 #3
0
파일: bytes.go 프로젝트: kiskovacs/golucene
func newReverseBytesReader(bytes []byte) BytesReader {
	ans := &ReverseBytesReader{bytes: bytes}
	ans.DataInputImpl = util.NewDataInput(ans)
	return ans
}
예제 #4
0
파일: bytes.go 프로젝트: kiskovacs/golucene
func newForwardBytesReader(bytes []byte) BytesReader {
	ans := &ForwardBytesReader{bytes: bytes}
	ans.DataInputImpl = util.NewDataInput(ans)
	return ans
}
예제 #5
0
파일: bytes.go 프로젝트: kiskovacs/golucene
func newBytesStoreReverseReader(owner *BytesStore, current []byte) *BytesStoreReverseReader {
	ans := &BytesStoreReverseReader{owner: owner, current: current, nextBuffer: -1}
	ans.DataInputImpl = util.NewDataInput(ans)
	return ans
}
예제 #6
0
파일: input.go 프로젝트: kiskovacs/golucene
func NewEmptyByteArrayDataInput() *ByteArrayDataInput {
	ans := &ByteArrayDataInput{}
	ans.DataInputImpl = util.NewDataInput(ans)
	ans.Reset(make([]byte, 0))
	return ans
}
예제 #7
0
파일: input.go 프로젝트: kiskovacs/golucene
func NewByteArrayDataInput(bytes []byte) *ByteArrayDataInput {
	ans := &ByteArrayDataInput{}
	ans.DataInputImpl = util.NewDataInput(ans)
	ans.Reset(bytes)
	return ans
}