public interface RevisionDataInput
extends java.io.DataInput
This interface is designed to be used to consume data serialized using RevisionDataOutput.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RevisionDataInput.ElementDeserializer<T>
Defines a Function signature that can deserialize an element from a RevisionDataInput.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getBaseStream()
Gets a pointer to the InputStream that this RevisionDataInput reads from.
|
byte[] |
readArray()
Decodes a byte array that has been serialized using RevisionDataOutput.writeArray(byte[]).
|
<T> T[] |
readArray(RevisionDataInput.ElementDeserializer<T> elementDeserializer,
java.util.function.IntFunction<T[]> newArray)
Decodes a specific array that has been serialized using RevisionDataOutput.writeArray(T[], ElementSerializer).
|
<T> java.util.Collection<T> |
readCollection(RevisionDataInput.ElementDeserializer<T> elementDeserializer)
Decodes a generic Collection that has been serialized using RevisionDataOutput.writeCollection().
|
<T,C extends java.util.Collection<T>> |
readCollection(RevisionDataInput.ElementDeserializer<T> elementDeserializer,
java.util.function.Supplier<C> newCollection)
Decodes a specific Collection that has been serialized using RevisionDataOutput.writeCollection().
|
int |
readCompactInt()
Decodes an Integer that has been serialized using RevisionDataOutput.writeCompactInt().
|
long |
readCompactLong()
Decodes a Long that has been serialized using RevisionDataOutput.writeCompactLong().
|
<K,V> java.util.Map<K,V> |
readMap(RevisionDataInput.ElementDeserializer<K> keyDeserializer,
RevisionDataInput.ElementDeserializer<V> valueDeserializer)
Decodes a generic Map that has been serialized using RevisionDataOutput.writeMap().
|
<K,V,M extends java.util.Map<K,V>> |
readMap(RevisionDataInput.ElementDeserializer<K> keyDeserializer,
RevisionDataInput.ElementDeserializer<V> valueDeserializer,
java.util.function.Supplier<M> newMap)
Decodes a specific Map that has been serialized using RevisionDataOutput.writeMap().
|
java.util.UUID |
readUUID()
Decodes a UUID that has been serialized using RevisionDataOutput.writeUUID().
|
java.io.InputStream getBaseStream()
long readCompactLong()
throws java.io.IOException
java.io.IOException - If an IO Exception occurred.int readCompactInt()
throws java.io.IOException
java.io.IOException - If an IO Exception occurred.java.util.UUID readUUID()
throws java.io.IOException
java.io.IOException - If an IO Exception occurred.<T> java.util.Collection<T> readCollection(RevisionDataInput.ElementDeserializer<T> elementDeserializer) throws java.io.IOException
T - Type of the elements in the Collection.elementDeserializer - A Function that will decode a single element of the Collection from the given RevisionDataInput.java.io.IOException - If an IO Exception occurred.<T,C extends java.util.Collection<T>> C readCollection(RevisionDataInput.ElementDeserializer<T> elementDeserializer, java.util.function.Supplier<C> newCollection) throws java.io.IOException
T - Type of the elements in the Collection.C - Type of the Collection desired to be instantiated and returned.elementDeserializer - A Function that will decode a single element of the Collection from the given RevisionDataInput.newCollection - A Supplier that will create a new instance of the Collection type desired.java.io.IOException - If an IO Exception occurred.<T> T[] readArray(RevisionDataInput.ElementDeserializer<T> elementDeserializer, java.util.function.IntFunction<T[]> newArray) throws java.io.IOException
T - Type of the elements in the array.elementDeserializer - A Function that will decode a single element of the Collection from the given RevisionDataInput.newArray - A Function that will create a new instance of the array type desired, with the specified length.java.io.IOException - If an IO Exception occurred.byte[] readArray()
throws java.io.IOException
java.io.IOException - If an IO Exception occurred.<K,V> java.util.Map<K,V> readMap(RevisionDataInput.ElementDeserializer<K> keyDeserializer, RevisionDataInput.ElementDeserializer<V> valueDeserializer) throws java.io.IOException
K - Type of the Keys in the Map.V - Type of the Values in the Map.keyDeserializer - A Function that will decode a single Key of the Map from the given RevisionDataInput.valueDeserializer - A Function that will decode a single Value of the Map from the given RevisionDataInput.java.io.IOException - If an IOException occurred.<K,V,M extends java.util.Map<K,V>> M readMap(RevisionDataInput.ElementDeserializer<K> keyDeserializer, RevisionDataInput.ElementDeserializer<V> valueDeserializer, java.util.function.Supplier<M> newMap) throws java.io.IOException
K - Type of the Keys in the Map.V - Type of the Values in the Map.M - Type of the Map desired to be instantiated and returned.keyDeserializer - A Function that will decode a single Key of the Map from the given RevisionDataInput.valueDeserializer - A Function that will decode a single Value of the Map from the given RevisionDataInput.newMap - A Supplier that will create a new instance of the Map type desired.java.io.IOException - If an IOException occurred.