if (message.getEnclosures() != null && message.getEnclosures().size() > 0) {
out.startArray(Rss.ENCLOSURES);
for (Object oEnclosure : message.getEnclosures()) {
if (oEnclosure instanceof SyndEnclosure) {
out.startObject();
SyndEnclosure enclosure = (SyndEnclosure) oEnclosure;
out.field(Rss.Enclosures.URL, enclosure.getUrl());
out.field(Rss.Enclosures.TYPE, enclosure.getType());
out.field(Rss.Enclosures.LENGTH, enclosure.getLength());
out.endObject();
}
}
out.endArray();
}