Yotam Harchol | 161a5d5 | 2013-07-25 17:17:48 -0700 | [diff] [blame^] | 1 | package org.openflow.types; |
2 | |||||
3 | import org.jboss.netty.buffer.ChannelBuffer; | ||||
4 | import org.openflow.exceptions.OFParseError; | ||||
5 | |||||
6 | |||||
7 | |||||
8 | public interface OFValueType { | ||||
9 | |||||
10 | public int getLength(); | ||||
11 | public byte[] getBytes(); | ||||
12 | |||||
13 | public interface Serializer<T extends OFValueType> { | ||||
14 | public void writeTo(T value, ChannelBuffer c); | ||||
15 | public T readFrom(ChannelBuffer c) throws OFParseError; | ||||
16 | } | ||||
17 | |||||
18 | } |