class NoticeResponse extends PGMessage {

    public static NoticeResponse loadFromPacket(byte[] packet) {
        PGProto proto = new PGProto(packet, 5);
        List<Notice> notices = new LinkedList<>();
        while (true) {
            byte code = proto.readByte();
            if (code == 0x0) {
                break;
            }
            String noticeStr = proto.readNullStr();
            notices.add(new Notice(code, noticeStr));
        }
        return new NoticeResponse(notices);
    }

    public  NoticeResponse();
    public  NoticeResponse(List<Notice> notices);

}