use of org.glassfish.jersey.spi.ContentEncoder in project jersey by jersey.
the class EncodingFilter method getSupportedEncodings.
/**
* Returns a (lexically) sorted set of supported encodings.
* @return sorted set of supported encodings.
*/
SortedSet<String> getSupportedEncodings() {
// may be set twice, but it does not break anything
if (supportedEncodings == null) {
SortedSet<String> se = new TreeSet<>();
List<ContentEncoder> encoders = injectionManager.getAllInstances(ContentEncoder.class);
for (ContentEncoder encoder : encoders) {
se.addAll(encoder.getSupportedEncodings());
}
se.add(IDENTITY_ENCODING);
supportedEncodings = se;
}
return supportedEncodings;
}
use of org.glassfish.jersey.spi.ContentEncoder in project jersey by jersey.
the class EncodingFilter method getSupportedEncodings.
List<Object> getSupportedEncodings() {
// may be set twice, but it does not break anything
if (supportedEncodings == null) {
SortedSet<String> se = new TreeSet<>();
List<ContentEncoder> encoders = injectionManager.getAllInstances(ContentEncoder.class);
for (ContentEncoder encoder : encoders) {
se.addAll(encoder.getSupportedEncodings());
}
supportedEncodings = new ArrayList<Object>(se);
}
return supportedEncodings;
}
Aggregations