|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.PagedBytes
public final class PagedBytes
Represents a logical byte[] as a series of pages. You can write-once into the logical byte[] (append only), using copy, and then retrieve slices (BytesRef) into it using fill.
Nested Class Summary | |
---|---|
class |
PagedBytes.PagedBytesDataInput
|
class |
PagedBytes.PagedBytesDataOutput
|
static class |
PagedBytes.Reader
Provides methods to read BytesRefs from a frozen PagedBytes. |
Constructor Summary | |
---|---|
PagedBytes(int blockBits)
1< |
Method Summary | |
---|---|
void |
copy(BytesRef bytes)
Copy BytesRef in |
void |
copy(BytesRef bytes,
BytesRef out)
Copy BytesRef in, setting BytesRef out to the result. |
void |
copy(IndexInput in,
long byteCount)
Read this many bytes from in |
long |
copyUsingLengthPrefix(BytesRef bytes)
Copy bytes in, writing the length as a 1 or 2 byte vInt prefix. |
PagedBytes.Reader |
freeze(boolean trim)
Commits final byte[], trimming it if necessary and if trim=true |
PagedBytes.PagedBytesDataInput |
getDataInput()
Returns a DataInput to read values from this PagedBytes instance. |
PagedBytes.PagedBytesDataOutput |
getDataOutput()
Returns a DataOutput that you may use to write into this PagedBytes instance. |
long |
getPointer()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PagedBytes(int blockBits)
Method Detail |
---|
public void copy(IndexInput in, long byteCount) throws IOException
IOException
public void copy(BytesRef bytes) throws IOException
IOException
public void copy(BytesRef bytes, BytesRef out) throws IOException
IOException
public PagedBytes.Reader freeze(boolean trim)
public long getPointer()
public long copyUsingLengthPrefix(BytesRef bytes) throws IOException
IOException
public PagedBytes.PagedBytesDataInput getDataInput()
public PagedBytes.PagedBytesDataOutput getDataOutput()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |