A byteable object can be converted into an array of Bytes.
| 4 | * A byteable object can be converted into an array of Bytes. |
| 5 | */ |
| 6 | public interface Byteable { |
| 7 | |
| 8 | /** |
| 9 | * Computes the byte representation of the object. |
| 10 | * |
| 11 | * @return array of bytes |
| 12 | */ |
| 13 | byte[] toByteArray(); |
| 14 | |
| 15 | /** |
| 16 | * Function to retrieve the length of the byte array needed to represent the object. |
| 17 | * |
| 18 | * @return the size of byte array |
| 19 | */ |
| 20 | int sizeOfByteArray(); |
| 21 | |
| 22 | } |
no outgoing calls
no test coverage detected