(Kryo kryo, Output output)
| 214 | } |
| 215 | |
| 216 | public void write(Kryo kryo, Output output) { |
| 217 | int bucketCount = buckets.size(); |
| 218 | output.writeShort(bucketCount); |
| 219 | |
| 220 | for (Map.Entry<HistogramBucket, Long> bucket : buckets.entrySet()) { |
| 221 | bucket.getKey().write(kryo, output); |
| 222 | output.writeLong(bucket.getValue(), true); |
| 223 | } |
| 224 | |
| 225 | output.writeLong(this.getUnderflow(), true); |
| 226 | output.writeLong(this.getOverflow(), true); |
| 227 | } |
| 228 | |
| 229 | public void read(Kryo kryo, Input input) { |
| 230 | int bucketCount = input.readShort(); |