@Override
    public void encode(OutputStream os) throws IOException {
        os.write(PREFIX);
        for (Map.Entry<BencodeString, BencodeType> entry : dictionary.entrySet()) {
            entry.getKey().encode(os);
            entry.getValue().encode(os);
        }
        os.write(COMMON_POSTFIX);
    }