Modifier and Type | Field and Description |
---|---|
private static long |
BASE_NUM_BYTES |
private static BytesRef |
NO_OUTPUT |
private static ByteSequenceOutputs |
singleton |
Modifier | Constructor and Description |
---|---|
private |
ByteSequenceOutputs() |
Modifier and Type | Method and Description |
---|---|
BytesRef |
add(BytesRef prefix,
BytesRef output)
Eg add("foo", "bar") -> "foobar"
|
BytesRef |
common(BytesRef output1,
BytesRef output2)
Eg common("foobar", "food") -> "foo"
|
BytesRef |
getNoOutput()
NOTE: this output is compared with == so you must
ensure that all methods return the single object if
it's really no output
|
static ByteSequenceOutputs |
getSingleton() |
java.lang.String |
outputToString(BytesRef output) |
long |
ramBytesUsed(BytesRef output)
Return memory usage for the provided output.
|
BytesRef |
read(DataInput in)
Decode an output value previously written with
Outputs.write(Object, DataOutput) . |
void |
skipOutput(DataInput in)
Skip the output; defaults to just calling
Outputs.read(org.apache.lucene.store.DataInput)
and discarding the result. |
BytesRef |
subtract(BytesRef output,
BytesRef inc)
Eg subtract("foobar", "foo") -> "bar"
|
java.lang.String |
toString() |
void |
write(BytesRef prefix,
DataOutput out)
Encode an output value into a
DataOutput . |
merge, readFinalOutput, skipFinalOutput, writeFinalOutput
private static final BytesRef NO_OUTPUT
private static final ByteSequenceOutputs singleton
private static final long BASE_NUM_BYTES
public static ByteSequenceOutputs getSingleton()
public BytesRef common(BytesRef output1, BytesRef output2)
Outputs
public BytesRef subtract(BytesRef output, BytesRef inc)
Outputs
public BytesRef add(BytesRef prefix, BytesRef output)
Outputs
public void write(BytesRef prefix, DataOutput out) throws java.io.IOException
Outputs
DataOutput
.public BytesRef read(DataInput in) throws java.io.IOException
Outputs
Outputs.write(Object, DataOutput)
.public void skipOutput(DataInput in) throws java.io.IOException
Outputs
Outputs.read(org.apache.lucene.store.DataInput)
and discarding the result.skipOutput
in class Outputs<BytesRef>
java.io.IOException
public BytesRef getNoOutput()
Outputs
getNoOutput
in class Outputs<BytesRef>
public java.lang.String outputToString(BytesRef output)
outputToString
in class Outputs<BytesRef>
public long ramBytesUsed(BytesRef output)
Outputs
ramBytesUsed
in class Outputs<BytesRef>
Accountable
public java.lang.String toString()
toString
in class java.lang.Object