boolean supported = true;
// True if all representation's encodings are IDENTITY
boolean identityEncodings = true;
for (final Iterator<Encoding> iter = representation.getEncodings()
.iterator(); supported && iter.hasNext();) {
final Encoding encoding = iter.next();
supported = DecodeRepresentation.getSupportedEncodings().contains(
encoding);
identityEncodings &= encoding.equals(Encoding.IDENTITY);
}
if (supported && !identityEncodings) {
result = new DecodeRepresentation(representation);
}