Interface Writeable.Writer<V>
-
- Enclosing interface:
- Writeable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface Writeable.Writer<V>Reference to a method that can write some object to aStreamOutput.By convention this is a method from
StreamOutputitself (e.g.,StreamOutput.writeString(java.lang.String)). If the value can benull, then the "optional" variant of methods should be used!Most classes should implement
Writeableand theWriteable.writeTo(StreamOutput)method should useStreamOutputmethods directly or this indirectly:public void writeTo(StreamOutput out) throws IOException { out.writeVInt(someValue); out.writeMapOfLists(someMap, StreamOutput::writeString, StreamOutput::writeString); }
-
-
Method Summary
Modifier and Type Method Description voidwrite(StreamOutput out, V value)WriteV-typevalueto theoutput stream.
-
-
-
Method Detail
-
write
void write(StreamOutput out, V value) throws java.io.IOException
WriteV-typevalueto theoutput stream.- Parameters:
out- Output to write thevaluetoovalue- The value to add- Throws:
java.io.IOException
-
-