public OpenWindowMessage decode(ChannelBuffer buffer) throws IOException {
int id = buffer.readUnsignedByte();
int type = buffer.readUnsignedByte();
String title = ChannelBufferUtils.readUtf8String(buffer);
int slots = buffer.readUnsignedByte();
return new OpenWindowMessage(id, type, title, slots);
}