more code
[iotcloud.git] / src / java / iotcloud / TableStatus.java
1 package iotcloud;
2 import java.nio.ByteBuffer;
3
4 class TableStatus extends Entry {
5         int maxslots;
6         
7         TableStatus(int _maxslots) {
8                 maxslots=_maxslots;
9         }
10         
11         static Entry decode(ByteBuffer bb) {
12                 int maxslots=bb.getInt();
13                 return new TableStatus(maxslots);
14         }
15
16         void encode(ByteBuffer bb) {
17                 bb.put(Entry.TypeTableStatus);
18                 bb.putInt(maxslots);
19         }
20
21         int getSize() {
22                 return Integer.BYTES+Byte.BYTES;
23         }
24 }