STATE - The type of state marshalled.public abstract class SafeChannelMarshal<STATE> extends Object implements ChannelMarshal<STATE>
| Constructor and Description |
|---|
SafeChannelMarshal() |
| Modifier and Type | Method and Description |
|---|---|
STATE |
unmarshal(org.neo4j.storageengine.api.ReadableChannel channel)
Unmarshals an instance of
STATE from channel. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarshalpublic final STATE unmarshal(org.neo4j.storageengine.api.ReadableChannel channel) throws IOException, EndOfStreamException
ChannelMarshalSTATE from channel. If the channel does not have enough bytes
to fully read an instance then an EndOfStreamException must be thrown.
N.B: The ReadableChannel is sort of broken in its implementation and throws
ReadPastEndException which is a subclass of IOException
and that is problematic since usually the case of reaching the end of a stream actually
requires handling distinct from that of arbitrary IOExceptions. Although it was possible
to catch that particular exception explicitly, you would not get compiler/IDE support
for making that apparent.unmarshal in interface ChannelMarshal<STATE>IOExceptionEndOfStreamExceptionCopyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.