// representation
return (Representation) payload;
}
else if (InputStream.class.isAssignableFrom(payload.getClass())) {
// inputStream
return new InputStreamRepresentation(variant.getMediaType(), (InputStream) payload);
}
else if (String.class.isAssignableFrom(payload.getClass())) {
// inputStream
return new StringRepresentation((String) payload, variant.getMediaType());
}