Finds the proper codec and calls it's encode method to create a byte array with the given ID as the first byte. @param id The ID of the histogram type to search for. @param data_point The non-null data point to encode. @param include_id Whether or not to include the ID prefix when encoding. @return
(final int id,
final Histogram data_point,
final boolean include_id)
| 183 | * the histogram may have been of the wrong type or failed encoding. |
| 184 | */ |
| 185 | public byte[] encode(final int id, |
| 186 | final Histogram data_point, |
| 187 | final boolean include_id) { |
| 188 | final HistogramDataPointCodec codec = getCodec(id); |
| 189 | return codec.encode(data_point, include_id); |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Finds the proper codec and calls it's decode method to return the histogram |
no test coverage detected